JSP Implicit Objects

In JSP, implicit objects are pre-defined objects, created by the web container. These objects are created during the translation phase from JSP to Servlet. JSP allows you to call these objects directly without initializing them.

Implicit objects are required to be declared in scriptlet tags only. Hence, in translation phase these objects are embedded within service() method of servlet.

Note: - Servlet provide these objects to enhance the ease of coding in JSP.

List of JSP implicit objects

JSP provides 9 implicit objects that can be used in JSP pages. Each object represents some unique identity. Here, is the list of all implicit objects with their classes.

        Object

                           Classes

out

javax.servlet.jsp.JspWriter

request

javax.servlet.http.HttpServletRequest

response

javax.servlet.http.HttpServletResponse

config

javax.servlet.ServletConfig

application

javax.servlet.ServletContext

session

javax.servlet.http.HttpSession

exception

javax.servlet.http.HttpException

Page

java.lang.object

PageContext

javax.servlet.jsp.PageContext

We will learn more about each object with simple examples.


Related Topics

JSP Cookie Handling

Cookie is a small piece of information sent by server to recognize the user. This information is stored at client side in the textual form. In JSP, cookie is an object...

1 minute read.

JSP Action Tags

As the name implies, JSP action tags are used to perform various actions during the execution of JSP page. Here, each action performs some specific task. These tasks include:  Forwarding the...

1 minute read.

JSP Life Cycle

JSP life cycle The life cycle of JSP page internally implemented as a Servlet. These are the following stages through which a JSP page has to pass: Translation – This is an...

2 minutes read.

JSP Comments

JSP provides separate tag for comment section. The content inside these tag is completely ignored by JSP engine.    The syntax of comment tag is mentioned below. <%-- This is a comment...

1 minute read.

JSP Control Statements

There are various standard programming languages like C, C++, Java etc. that supports control statements. On the basis of that, JSP also follows the same methodology. Let's study the flow...

2 minutes read.

JSP EL Implicit Objects

Apart from operators, JSP also provide expression language implicit objects. The role of these implicit objects is to get the attribute associated with various object. Here, is the list of...

1 minute read.

JSP Custom Tag

JSP custom tag provides flexibility to programmers, to declare their own tag. Thus, a user-defined tag can be created through custom tags to perform various operations. These custom tags behave as...

2 minutes read.

JSP page

In JSP, the purpose of page object is to create the servlet instance. The role of page object is similar to this keyword in Java. The page object represents the entire...

1 minute read.

JSTL XML Tags

In JSTL, XML tags are used for creating and manipulating xml documents. The following syntax represent the URL of XML tag: - <%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %> To utilize the functionality of...

1 minute read.

JSP Tutorial

Java Server Pages (JSP) is a server-side technology used to create static and dynamic web applications. The static content is expressed by text-based format files such as HTML, XML, SVG...

2 minutes read.

JSP pageContext

The object pageContext is used to access all the information of JSP page. It is an instance of javax.servlet.jsp.PageContext. The scope of pageContext can be defined explicitly. The object is valid...

2 minutes read.

JSP Expression Language

JSP introduced the concept of expression language (EL) in JSP 2.0 version. The purpose of expression language is to access and manipulate data easily without using any type of scriptlet. Why...

1 minute read.

JSP response

Basically, JSP response object is an instance of servlet's HttpServletResponse interface. It is used to resolve client request. Response object can be used to perform various functions such as encode...

1 minute read.

JSP exception

Like Java, exceptions can also be occurred in JSP. To handle these exceptions, JSP exception object is used. Handling exceptions in JSP using exception object is much easier approach. This...

1 minute read.

JSTL Core Tags

In JSTL, core tags are most frequently used tags that provides variable support, manages URL and control the flow of JSP page. To use JSTL it is required to associate...

2 minutes read.

JSP Implicit Objects

In JSP, implicit objects are pre-defined objects, created by the web container. These objects are created during the translation phase from JSP to Servlet. JSP allows you to call these...

1 minute read.

JSP Expression Tag

JSP expression tag allows you to place the result of Java expression in a convenient way. It can be seen as an alternative of out.print() method. Thus, if we want to...

1 minute read.

JSTL SQL Tags

In JSTL, SQL tags are used to access and manipulate various operations of database. It is responsible to interact the JSP page with any type of Database such as MySQL,...

2 minutes read.

JSP forward and include tag

In JSP, forward and include tags are the most frequently used action tags. Unlike Servlets, there is no need to create object of RequestDispatcher interface to use the functionality of...

1 minute read.

JSP out

In JSP, out is an implicit object that is associated with the response object. This object is used to write content to the output stream. Methods of JSP out Following are...

1 minute read.