Home > J2EE, JSP, Technical > Implicit Objects in JSP

Implicit Objects in JSP

February 28, 2012

There are some objects implicitly available in JSP for easy development of web application

out,request , response, session, application, exception, page, pageContext,  config

out: its an instance of JspWriter class, can use this object to send the outputstream to web client.

request: its an instance of HTTPServletRequest class, can use this object to get the request details of a JSP Page from a web client such as info abt query string, query header, cookies…etc

response: its an instance of HTTPServletResponse class, can use this object to send the response to web client.

session:its an instance of HTTPSession class, can use this object to track information of a particular client between multiple requests, its more helpful on stateless HTTP requests.

application:its an instance of ServletContext class,can use this object to get information abt the JSP Container.

exception:its an instance of Exception class,can use this object to throw the exceptions from previous JSP pages.

page:Its an instance of HTTPJspPage class, can use this object to call any method in page’s servlet.

pageContext:its an instance of jsp.pageContext class, can use this object to get attributes of a page

config:its an instance of ServletConfig class, can use this object to get the initialize parameters of servlet.

Advertisements
Categories: J2EE, JSP, Technical
%d bloggers like this: