YouTip LogoYouTip

Jstl Core Set Tag

# <c:set> Tag [![Image 3: JSP Standard Tag Library](#)JSP Standard Tag Library](#) The <c:set> tag is used to set the value of a variable or an object property. The <c:set> tag is the twin brother of the <jsp:setProperty> action tag. This tag is very useful because it evaluates an expression and uses the result to set the value of a JavaBean object or a java.util.Map object. ### Syntax Format <c:set var="" value="" target="" property="" scope=""/> ### Attributes The <c:set> tag has the following attributes: | **Attribute** | **Description** | **Required** | **Default Value** | | --- | --- | --- | --- | | value | The value to be stored | No | Body content | | no | The object to which the property belongs | No | None | | property | The property to be modified | No | None | | var | The variable to store the information | No | None | | scope | The scope of the var attribute | No | Page | If the target attribute is specified, then the property attribute must also be specified. * * * ## Example c:set Tag Example The result is as follows: 4000 * * JSP Standard Tag Library](#)
← Jstl Core Remove TagJstl Core Out Tag β†’