JSP Tutorials - Herong's Tutorial Examples
∟EL (Expression Language)
∟Predefined Implicit Objects
This section describes predefined implicit objects that directly accessible in EL expressions. The most important ones are 'pageContext', 'param' and 'cookie'.
EL expressions can access a set of predefined implicit objects:
- pageContext - A javax.servlet.jsp.PageContext object representing the execution environment of this Servlet.
This same object is also provided as an implicit object in the JSP scripting envirionment.
- pageScope - A java.util.Map object that maps page-scoped attribute names to their values.
- requestScope - A java.util.Map object that maps request-scoped attribute names to their values.
- sessionScope - A java.util.Map object that maps session-scoped attribute names to their values.
- applicationScope - A java.util.Map object that maps application-scoped attribute names to their values.
- param - A java.util.Map object that maps parameter names to a single String parameter value
(obtained by calling ServletRequest.getParameter(String)).
- paramValues - A java.util.Map object that maps parameter names to a String[] of all values for that parameter
(obtained by calling ServletRequest.getParameterValues(String)).
- header - A java.util.Map object that maps header names to a single String header value
(obtained by calling ServletRequest.getheader(String)).
- headerValues - A java.util.Map object that maps header names to a String[] of all values for that parameter
(obtained by calling ServletRequest.getHeaders(String)).
- cookie - A java.util.Map object that maps cookie names to a single Cookie
(obtained by calling HttpServletRequest.getCookie(String)).
- initParam - A java.util.Map object Map that maps a parameter names to a single String parameter value
(obtained by calling ServletRequest.getInitParameter(String)).
Note that JSP scripting elements and EL expressions do not share the same set of implicit objects.
For example, "request" is an implicit object for scripting elements, but not for EL expressions.
Last update: 2012.
Table of Contents
About This Book
JSP (JavaServer Pages) Overview
Tomcat 7 Installation on Windows Systems
JSP Scripting Elements
Java Servlet Introduction
JSP Implicit Objects
Syntax of JSP Pages and JSP Documents
JSP Application Session
Managing Cookies in JSP Pages
JavaBean Objects and "useBean" Action Elements
Managing HTTP Response Header Lines
Non-ASCII Characters Support in JSP Pages
Performance of JSP Pages
►EL (Expression Language)
What is EL (Expression Language)?
EL Expression Types and Usage
Literal Data and Named Variables
Basic Operators and Operations
►Predefined Implicit Objects
Collection Elements and Object Properties
Expression Examples in Static Text
Expression Examples in Static Text - Result
EL Variables Are pageContext Attributes
Overview of JSTL (JSP Standard Tag Libraries)
JSTL Core Library
JSP Custom Tags
JSP Java Tag Interface
Custom Tag Attributes
Multiple Tags Working Together
File Upload Test Application
Outdated Tutorials
References
PDF Printing Version