What are the implicit objects available in JSP?

What are the implicit objects available in JSP?

Ninja Asked on 18th September 2018 in Jsp.
Add Comment
1 Answer(s)
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:

  1. request – An object of javax.servlet.http.HttpServletRequest associated with the request
  2. response – An object of javax.servlet.http.HttpServletResponse associated with the response to the client
  3. pageContext – An object of javax.servlet.jsp.PageContext which represents the context for the JSP page. Provides access to various objects of the page.
  4. session – An object of  javax.servlet.http.HttpSession associated with the client.
  5. application – An object of  javax.servlet.ServletContext that represents the servlet context obtained from the servlet configuration object
  6. out – An object of  javax.servlet.jsp.JspWriter that writes into the output stream
  7. config – An object of javax.servlet.ServletConfig  associated with this JSP page
  8. page – An object of java.lang.Object which represents the instance of the current page’s implementation class processing the current request
  9. exception – An object of java.lang.Throwable represents the uncaught Throwable that resulted in the error page being invoked

Ninja Answered on 18th September 2018.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.