Java Training: -How will you explain the implicit EL (Expression Language) objects in JSP?

Published on by javainterviewseries

Following are the implicit EL (Expression Language) objects:-

 

Page Context: The context for the JSP page.

 

Provides access to various objects for instance:-

 

servletContext: The context for the JSP page's servlet and any web components contained in the same application.

 

session: The session object for the client.

 

request: The request triggering the execution of the JSP page.

 

response: The response returned by the JSP page. See Constructing Responses.

 

In addition, several implicit objects are available that allow easy access to the following objects:

 

param: Maps a request parameter name to a single value

 

paramValues: Maps a request parameter name to an array of values

 

header: Maps a request header name to a single value

 

header Values: Maps a request header name to an array of values

 

cookie: Maps a cookie name to a single cookie

 

initParam: Maps a context initialization parameter name to a single value

 

Finally, there are objects that allow access to the various scoped variables described in Using Scope Objects.

 

page Scope: Maps page-scoped variable names to their values

 

request Scope: Maps request-scoped variable names to their values

 

session Scope: Maps session-scoped variable names to their values

 

application Scope: Maps application-scoped variable names to their values

 

For instance the below snippet will indentify the browser used by the client.

el.jpg

 

See the following video on overview and working of Servlets: -

 

 

Click to get Java/Servlets Training

 

Regards,

 

Get more Java/Servlets training stuffs from author's blog

To be informed of the latest articles, subscribe:

Comment on this post