Thread: What are the implicit objects

Forum : Java Server Pages (Jsp)   21 Apr, 2017 10:09
User Image


Joined: 15 Jul, 2016

Points: 1000

Threads: 645

Posts: 201

Answer Icon What are the implicit objects

| Quote Date : 21 Apr, 2017    Views:900    

What are the implicit objects in JSP?

tags: jsp j2ee


User Image


Joined : 27 Jun, 2017

Points : 165

Threads: 59

Posts: 123

Answer IconRe: What are the implicit objects

Reply Date : 10 Jul, 2017

JSP Implicit objects are created by the web container.JSP Implicit Objects are also called pre-defined variables.Implicit objects need not to be declared, defined or instantiated like other JAVA Objects. These implicit objects are Java objects that implement interfaces in the Servlet and JSP API. Scripting elements in a JSP page can make use of these JSP implicit objects. Developer can use these objects by directly calling it by name.Since these objects are created automatically by the container and are accessed using standard variables hence, they are called implicit objects.

Implicit objects are 9 specific objects that exist in every jsp page by default and provide multiple functionality depending on the object.

1) request implicit object
2) response implicit object
3) out implicit object
4) session implicit object
5) application implicit object
6) exception implicit object
7) config implicit object
8) page implicit object
9) pageContext implicit object

The implicit objects are parsed by the container and inserted into the generated servlet code. They are available only within the jspService method and not in any declaration.we can?t use jsp implicit objects in JSP declaration because that code will go at class level.

User Image


Joined : 28 Jun, 2017

Points : 145

Threads: 31

Posts: 101

Re: What are the implicit objects

Reply Date : 10 Jul, 2017

implicit objects           type
request                  javax.servlet.http.HttpServletRequest                           exception ???java.lang.Throwable
config?????  javax.servlet.ServletConfig
application??? javax.servlet.ServletContext
session????   javax.servlet.http.HttpSession

Load More

No More Comments