JSP GetProperty Action
JSP GetProperty Action Element
- All the JSP action elements are used during the request processing phase, and not as the directive elements and script elements, which are used during the translation phase
- All JSP action elements are specified in XML tags and can not be used in an XML directive as these have no end tag
- The JSP getProperty action element gets the named property and outputs its value for inclusion in the page as a String
Here is the notation for the JSP getProperty action element:
XML Description <jsp:getProperty attributes /> The getProperty action element cannot have any body part.
The following table lists the attribute(s) for the JSP getProperty action element:
Attribute Description name The name of the Bean that has a property to be retrieved. The Bean must have been previously defined. It could also be an instance from JSTL code. property The property attribute is the name of the Bean property to be retrieved.
Example of using JSP getProperty action element.
In the example we use Netbeans IDE and Glassfish Server.
You can download this example here (needed tools can be found in the right menu on this page).
If you want to go through this example, you'll find it under JSP SetProperty action.
© 2010 by Finnesand Data. All rights reserved.
This site aims to provide FREE programming training and technics.
Finnesand Data as site owner gives no warranty for the
correctness in the pages or source codes.
The risk of using this web-site pages or any program
codes from this website is entirely at the individual user.