144 CHAPTER 3: Best Practices in Java EE Web Development
Listing 3-53. Using
<%-- body content --%>
The
The
store it in a variable specified by the var attribute.
Here’s the syntax without body content:
<c:url value [context] [var] [scope]/>
Here’s the syntax with body content to specify query string parameters:
<c:url value [context] [var] [scope]>
The only required attribute is value, which is the URL to be processed.
<c:param> subtags can also be specified within the body of <c:url> for adding
to the URL query string parameters, which will be properly encoded if necessary.
The attributed of
Table 3-22.
Name Type Description
value String URL to be processed.
context String Name of the context when specifying a relative URL resource that belongs to a
foreign context.
var String Name of the exported scoped variable for the processed URL.
scope String Scope for var.
Listing 3-54 shows the simple usage of
Listing 3-54. Using