<jsp:setProperty>
The <jsp:setProperty>
action sets the value
of one or more bean properties. It supports the attributes described
in Table 1-9.
Name |
Java type |
Request-time value accepted |
Description |
|
|
no |
Mandatory. The name assigned to a bean in one of the JSP scopes. |
|
|
no |
Mandatory. The name of the bean property to set, or an asterisk
( |
|
|
no |
Optional. The name of a request parameter that holds the value to use for the specified property. If omitted, the parameter name and property name must be the same. |
|
See below |
yes |
Optional. An explicit value to assign to the property. This attribute
cannot be combined with the |
The property type can be any valid Java type, including primitive
types and arrays (i.e., an indexed property). If the
value
attribute specifies a runtime attribute
value, the type of the expression must match the property’s
type.
If the value is a string, either in the form of a request parameter
value or explicitly specified by the value
attribute, it is converted to the property’s type as described
in Table 1-10.
Property type |
Conversion method |
|
|
|
|
|
|
|
|
Get JavaServer Pages Pocket Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.