Jsp setProperty
Jsp setProperty
This action tag is to set an input value to set input value to a property on a variable of bean class by calling setter () method of the property.
When use JSP setPriority tag
When a request comes from browser, the protocol is http and it is unknown for the java bean. So, directly input values from browser can't be send to a java bean.
The flow of setting input values is, a jsp page takes request from browser and it will set input values to bean using
<jsp:setProperty> must be used inside <jsp:useBean> tag.
<jsp:setProperty> property contains four attributes, they are;
Attribute | Description |
---|---|
Name | Object name: The values of this attribute must be same as the value of id of the bean class |
Property | variable name in bean class |
Param | request parameter name |
Value | static value |
Name, property,value | allowed |
Name ,property, param | allowed |
Property, param | not allowed |
Name, property,name, param | not allowed. |