Home Help Java I JSP Implicit Objects

Related Tutorials


 
 

Share on Google+Share on Google+

JSP Implicit Objects

Advertisement
Implicit objects in jsp are the objects that are created by the container automatically, we do not need to create them explicitly.

JSP Implicit Objects

     

Implicit objects in jsp are the objects that are created by the container automatically, we do not need to create them explicitly. Since these objects are created automatically therefore these are known as the implicit objects. Implicit objects are used for different purposes. Our own methods (user defined methods) can't access them as they are local to the service method and are created at the conversion time of a jsp into a servlet. But we can pass them to our own method if we wish to use them locally in those functions.

There are nine implicit objects. Here is the list of all the implicit objects:

  • Application: This object is available at the widest context level, that allows to share the same information between the JSP page's servlet and any Web components contained in the same.
  • Config: Config object allows to pass the initialization data to a JSP page's servlet.
  • Exception: Exception object allows the exception data to be accessed only by designated JSP "error pages."
  • Out: This object allows us to access the servlet's output stream.
  • Page: This object is an instance of the JSP page's servlet class that processes the current request.
  • Pagecontext: Pagecontext is the context for the JSP page itself that provides a single API to manage the various scoped attributes. This API is extensively used if we are implementing JSP custom tag handlers.
  • Request: Request object is used to access the HTTP request data, and also provides a context to associate the request-specific data.
  • Response: This object allows direct access to the HTTPServletResponse class object.
  • Session: Perhaps it is the most commonly used object to manage the state contexts.

 

Advertisement

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: November 11, 2009

Related Tutorials

Discuss: JSP Implicit Objects  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0
DMCA.com