Saturday, 14 March 2015

jsp Implicit Objects


JSP page provides access to some implicit objects, that you can access from scriptlets. JSP implicit objects are created by container while translating the Jsp page into servlet.

Object Type Description
request
javax.servlet.ServletRequest
The ServletRequest or HttpServletRequest
being serviced.
response javax.servlet.ServletResponse
The ServletResponse or HttpServletResponse
that will receive the generated HTML output.
pageContext javax.servlet.jsp.PageContext The page context for this JSP page.
session javax.servlet.http.HttpSession
The session object created for the requesting client (if any).
This variable is only valid for HTTP protocols.
application javax.servlet.ServletContext The servlet context obtained from the servlet configuration object.
out javax.servlet.jsp.JspWriter An object that writes into the output stream
config javax.servlet.ServletConfig The ServletConfig for this JSP page
page java.lang.Object A reference to the JSP page itself.

In addition to the above implicit objects, there is exception object, which is accessed from the Error page.

exception java.lang.Throwable An uncaught exception that causes the error page to be invoked. This variable is available only to pages with isErrorPage="true".


Prevoius                                                 Next                                                 Home

No comments:

Post a Comment