What are the implicit objects available in JSP?
Answered
What are the implicit objects available in JSP?
Best answer
In JSP, some objects are created implicitly. The implicit objects are available for use within scriptlets and scriptlet expressions. Each implicit object has a class or interface type defined in a core Java technology or Java Servlet API package.
Implicit objects available in JSP are:
- request – An object of javax.servlet.http.HttpServletRequest associated with the request
- response – An object of javax.servlet.http.HttpServletResponse associated with the response to the client
- pageContext – An object of javax.servlet.jsp.PageContext which represents the context for the JSP page. Provides access to various objects of the page.
- session – An object of javax.servlet.http.HttpSession associated with the client.
- application – An object of javax.servlet.ServletContext that represents the servlet context obtained from the servlet configuration object
- out – An object of javax.servlet.jsp.JspWriter that writes into the output stream
- config – An object of javax.servlet.ServletConfig associated with this JSP page
- page – An object of java.lang.Object which represents the instance of the current page’s implementation class processing the current request
- exception – An object of java.lang.Throwable represents the uncaught Throwable that resulted in the error page being invoked