%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
JSP 2.0 Expression Language - Implicit Objects
JSP 2.0 Expression Language - Implicit Objects
This example illustrates some of the implicit objects available
in the Expression Lanaguage. The following implicit objects are
available (not all illustrated here):
- pageContext - the PageContext object
- pageScope - a Map that maps page-scoped attribute names to
their values
- requestScope - a Map that maps request-scoped attribute names
to their values
- sessionScope - a Map that maps session-scoped attribute names
to their values
- applicationScope - a Map that maps application-scoped attribute
names to their values
- param - a Map that maps parameter names to a single String
parameter value
- paramValues - a Map that maps parameter names to a String[] of
all values for that parameter
- header - a Map that maps header names to a single String
header value
- headerValues - a Map that maps header names to a String[] of
all values for that header
- initParam - a Map that maps context initialization parameter
names to their String parameter value
- cookie - a Map that maps cookie names to a single Cookie object.
Change Parameter
EL Expression |
Result |
\${param.foo} |
${fn:escapeXml(param["foo"])} |
\${param["foo"]} |
${fn:escapeXml(param["foo"])} |
\${header["host"]} |
${fn:escapeXml(header["host"])} |
\${header["accept"]} |
${fn:escapeXml(header["accept"])} |
\${header["user-agent"]} |
${fn:escapeXml(header["user-agent"])} |