JSP Implicit Objects


Prev Tutorial Next Tutorial

JSP Implicit Objects

JSP provides standard or predefined implicit objects, which can use directly in JSP page using JSP Scriptlet. The implicit objects are Servlet API class type and created by JSP containers

There are 9 jsp implicit objects. These objects are created by the web container (JSP containers) that are available to all the jsp pages.

The available implicit objects are out, request, response, page, pageContext, exception, config, session and application.

List of all 9 implicit object are;

Class typeObject
1HttpServletRequestrequest
2HttpServletResponseresponse
3ServletConfigconfig
4ServletContexapplication
5HttpSessionsession
6JspWriter/PrintWriterout
7Exceptionexception
8PageContextpagecontext
9Objectpage

All implicit objects of jsp are accessible with in the expression and scriptlet of the jsp, but not accessible in the declaration tags of the jsp.

In a jsp session and exception object are not available always. Because session object depends on session attribute of the page directive and exception depends on isErrorPage attribute of the page directive.

In a jsp, session object is available, if session equals to true in page directive.

In a jsp an exception object is available, if isErrorPage is equal to true in page directive.


Prev Tutorial Next Tutorial

Google Advertisements
Download Projects

Google Adsense Advertisements

Buy 3 Year Old Domain, Tutorialday.com, SeosmoTools.com @$200

Buy This Ad Space @$50 per Month, Ad Size 300X250 Contact on: hitesh.xc@gmail.com WhatsApp no. 8882538826

Yahoo Advertisements