Getting and Setting Bean Properties
The simplest form of the jsp:getProperty and jsp:setProperty elements are:
<jsp:getProperty name=“bean-name” property=“property”>
<jsp:setProperty name=“bean-name”
property=“property” value=“value”>
Here name is the Bean name specified in the jsp:useBean tag; property is the name of a property in its class.
The term value can be a literal string. The JSP container will attempt to convert it to the type of the argument of the associated set method.
- This will only work if the argument is String or a Java primitive type.
The term value can also be a JSP expression element.
- Note this represents an unusual nesting of elements.