YouTip LogoYouTip

Jstl Xml Set Tag

# Tag [![Image 3: JSP Standard Tag Library](#)JSP Standard Tag Library](#) The `` tag sets a variable to the value of an XPath expression. If the value of the XPath expression is a boolean type, `` will set a `java.lang.Boolean` object. If it is a string, it will set a `java.lang.String` object. If it is a number, it will set a `java.lang.Number` object. ### Syntax Format <x:set var="" select="" scope=""/> ### Attributes The `` tag has the following attributes: | **Attribute** | **Description** | **Required** | **Default Value** | | --- | --- | --- | --- | | var | Variable representing the value of the XPath expression | Yes | Body | | select | XPath expression to be evaluated | No | None | | scope | Scope of the var attribute | No | Page | * * * ## Example Demonstration The following example shows how to use the `` tag: JSTL x:set Tag

Books Info:

Padam History ZARA 100 Great Mistry NUHA 2000 The price of the second book: The result is as follows: BOOKS INFO:The price of the second book:[[book: null], [book: null]] * * JSP Standard Tag Library](#)
← Jstl Xml If TagJstl Xml Parse Tag β†’