JSP – Implicit Objects

JSP Implicit Objects

JSP Implicit Objects are the Java objects .These objects are created by the web container that are available to all the jsp pages JSP Implicit Objects are also know as pre-defined variables.

JSP Implicit Objects  are only  direclty use  in JSP scriptlets tag.it can’t use in JSP Declaration tag.because JSP Declaration tag  code will go outside of  _jspService() method .

There  are 9 implicit objects in jsp . of them are declared as local variable  inside  _jspService() method whereas 2 of them are part of _jspService() method argument

A list of the 9 implicit objects is given below:

  1. out Object
  2. request Object
  3. response Object
  4. config Object
  5. application Object
  6. session Object
  7. pageContext Object
  8. page Object
  9. exception Object

JSP object and their types

Object Type
request javax.servlet.http.HttpServletRequest
response javax.servlet.http.HttpServletResponse
out javax.servlet.jsp.JspWriter
session javax.servlet.http.HttpSession
application javax.servlet.ServletContext
config javax.servlet.ServletConfig
pageContext javax.servlet.jsp.PageContext
page java.lang.Object
Exception javax.servlet.jsp.JspException.

Leave a comment