Implicit Objects


Jsp implicit objects are the java objects which are created by the web container that are available to each jsp page and we can call them directly without declaring them explicitly.

These are also known as pre-defined objects.

In jsp, we have 9 implicit objects as follows:

1. request: It is an object of HttpServletRequest which is used to obtain the request information.

2. response: It is also an object of HttpServletRequest which is used to manipulate response to another resource.

3. out: It is an object of JspWriter which is used to write/print any data to the buffer.

4. session: It is an object of HttpSession which is used to track client session between client requests.

5. config: It is an object of ServletConfig which is used to access the initialization parameters of a jsp page.

6. application: It is an object of ServletContext which is used to get initialization parameter from the configuration file.

7. pageContext: It is an object of PageContext class which is used to access information about the jsp page and to get, set or remove attributes.

8. page: It is an object that represents the entire jsp page. This is a synonym of this object.

9. exception: It is an object of Throwable class which is used to print the exception.