<html>
<head>
<title>&lt;jsp:setProperty&gt;</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div id="Description">
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
<tr>
<td valign="top" class="NAME">&lt;jsp:setProperty&gt;</td>
<td valign="top" class="COMPATIBILITY">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
</tr>
<tr>
<td valign="top" colspan="2" class="description">
<p>The <span class="LITERAL">&lt;jsp:setProperty&gt;</span> action sets the value
of one or more bean properties.
</p>
<p>Example:</p>

<span class="PROGRAMLISTING"><pre>&lt;jsp:setProperty name="user" property="*" /&gt;
&lt;jsp:setProperty name="user" property="modDate" 
  value="&lt;%= new java.util.Date() %&gt;" /&gt;</pre></span>

</td></tr>
</table>
</div>

<div id="name">
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
<tr>
<td valign="top" class="NAME">name</td>
<td valign="top" class="COMPATIBILITY"><span class="LITERAL">String</span></td>
</tr>
<tr>
<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
</tr>
<tr>
<td valign="top" colspan="2" class="usage">Request-time value accepted: no</td>
</tr>
<tr>
<td valign="top" colspan="2" class="description"><p>
Mandatory. The name assigned to a bean in one of the JSP scopes.
</p></td>
</tr>
</table>
</div>
<div id="property">
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
<tr>
<td valign="top" class="NAME">property</td>
<td valign="top" class="COMPATIBILITY"><span class="LITERAL">String</span></td>
</tr>
<tr>
<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
</tr>
<tr>
<td valign="top" colspan="2" class="usage">Request-time value accepted: no</td>
</tr>
<tr>
<td valign="top" colspan="2" class="description"><p>
Mandatory. The name of the bean property to set, or an asterisk (<span class="LITERAL">*</span>) to set all properties with names matching the request parameters.
</p></td>
</tr>
</table>
</div>
<div id="param">
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
<tr>
<td valign="top" class="NAME">param</td>
<td valign="top" class="COMPATIBILITY"><span class="LITERAL">String</span></td>
</tr>
<tr>
<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
</tr>
<tr>
<td valign="top" colspan="2" class="usage">Request-time value accepted: no</td>
</tr>
<tr>
<td valign="top" colspan="2" class="description"><p>
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.
</p></td>
</tr>
</table>
</div>
<div id="value">
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
<tr>
<td valign="top" class="NAME">value</td>
<td valign="top" class="COMPATIBILITY">See below</td>
</tr>
<tr>
<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
</tr>
<tr>
<td valign="top" colspan="2" class="usage">Request-time value accepted: yes</td>
</tr>
<tr>
<td valign="top" colspan="2" class="description"><p>
Optional. An explicit value to assign to the property. This attribute cannot be combined with the <span class="LITERAL">param</span> attribute.
</p>
<p>The property type can be any valid Java type, including primitive
types and arrays (i.e., an indexed property). If the
<span class="LITERAL">value</span> attribute specifies a runtime attribute
value, the type of the expression must match the property's
type.
</p>

<p>If the value is a string, either in the form of a request parameter
value or explicitly specified by the <span class="LITERAL">value</span>
attribute, it is converted to the property's type as follows:
</p>

<table id="javaserverpr-CHP-1-TABLE-10" label="1-10">
<thead>
<tr valign="top">
<th>
<p>Property type</p>
</th>
<th>
<p>Conversion method</p>
</th>
</tr>
</thead>
<tbody>
<tr valign="top">
<td>
<p><span class="LITERAL">boolean</span> or <span class="LITERAL">Boolean</span></p>
</td>
<td>
<p><span class="LITERAL">Boolean.valueOf(String)</span></p>
</td>
</tr>
<tr valign="top">
<td>
<p><span class="LITERAL">byte</span> or <span class="LITERAL">Byte</span></p>
</td>
<td>
<p><span class="LITERAL">Byte.valueOf(String)</span></p>
</td>
</tr>
<tr valign="top">
<td>
<p><span class="LITERAL">char</span> or <span class="LITERAL">Character</span></p>
</td>
<td>
<p><span class="LITERAL">String.charAt(int)</span></p>
</td>
</tr>
<tr valign="top">
<td>
<p><span class="LITERAL">double</span> or <span class="LITERAL">Double</span></p>
</td>
<td>
<p><span class="LITERAL">Double.valueOf(String)</span></p>
</td>
</tr>
<tr valign="top">
<td>
<p><span class="LITERAL">float</span> or <span class="LITERAL">Float</span></p>
</td>
<td>
<p><span class="LITERAL">Float.valueOf(String)</span></p>
</td>
</tr>
<tr valign="top">
<td>
<p><span class="LITERAL">int</span> or <span class="LITERAL">Integer</span></p>
</td>
<td>
<p><span class="LITERAL">Integer.valueOf(String)</span></p>
</td>
</tr>
<tr valign="top">
<td>
<p><span class="LITERAL">long</span> or <span class="LITERAL">Long</span></p>
</td>
<td>
<p><span class="LITERAL">Long.valueOf(String)</span></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>