JSP Implicit Objects

JSP Implicit Objects

The implicit objects in JSP are actually the Java objects that are available for the developer and that can be called directly without explicitly being declared. The JSP implicit objects are also called the predefined variables that are made available by the JSP container. Recall the previous example in which we retrieved the for parameter from the HTML page by using the request variable, in that example the request is an implicit object and which is associated or which represents the HTTP Server Request object.

 

JSP implicit objects:

We have a total of nine implicit objects in JSP. Consider the following table in which the implicit objects in JSP are described:

Implicit objects Description
request HTTPServerRequest object and request are associated.
response HTTPServerResponse object and response are associated and this response is resent to the browser.
out JspWriter object and out stream of response are associated.
session HTTPSession object and session are associated for the given request of the user.
application ServletContent object and web application are associated.
config The object of servletConfig and page are associated.
pageContext This is used to encapsulate the use of some specific features of server.
page This is used to call the methods of servlet class. This is similar to the this keyword used in java programming language.
exception This object is used to represent the object which is thrown by another JSP page.