Jsp implicit objects

In JSP implicit objects are the objects created by implicitly, and can be directly used in Jsp programs with out declaring them. This is basically to reduce the code written by developer.

Below is list of Jsp implicit objects, along with the details

Implicit Object name Instance of class Brief
request javax.servlet.http.HttpServletRequest Used to retrieve all request parameters submitted from HTML page and to retrieve Cookies on Browser.

response

javax.servlet.http.HttpServletRespone used to send response from servlet to HTML Page, add Cookies to Browser, in Request Dispatcher

out

java.io.PrintWriter Used to send output from Servlet to Browser, generally HTML code

session

javax.servlet.http.HttpSession Stores details of current session in progress, using this session attributes can be set and get.

config

javax.servlet.ServletConfig used to retrieve initialization parameters which are specific to each servlet

application

javax.servlet.ServletContext used to retrieve initialization parameters which are common to all servlets

exception

java.lang.Throwable Has details of exception being thrown from a Jsp page.

pageContext

javax.servlet.jsp.PageContext Using this object you can find attribute, get attribute, set attribute and remove attribute at any of levels JSP Page (PAGE_CONTEXT) or HTTP Request (REQUEST_CONTEXT) or HTTP Session (SESSION_CONTEXT) or Application Level ( APPLICATION_CONTEXT)

page

java.lang.Object class and represents the current JSP page. page object provide reference to the generated servlet class. This object is very rarely used.