Jstl Core Url Tag
# Tag
[JSP Standard Tag Library](#)
The tag formats a URL into a string and stores it in a variable.
This tag automatically rewrites the URL when necessary.
The var attribute is used to store the formatted URL.
The tag is an alternative way to invoke the response.encodeURL() method. Its real advantage lies in providing proper URL encoding, including parameters specified in .
### Syntax Format
<c:url var="" scope="" value="" context=""/>
### Attributes
The tag has the following attributes:
| **Attribute** | **Description** | **Required** | **Default Value** |
| --- | --- | --- | --- |
| value | The base URL | Yes | None |
| context | The name of the local web application | No | The current application |
| var | The variable name representing the URL | No | Print to page |
| scope | The scope of the var attribute | No | Page |
* * *
## Example
c:url Tag Example
YouTip