10/06/2008
The availability of a JSP object for use from a particular place of the application is defined as the scope of that JSP object. Every object created in a JSP page will have a scope. Object scope in JSP is segregated into four parts and they are page, request, session and application.
- page
‘page’ scope means, the JSP object can be accessed only from within the same page where it was created. The default scope for JSP objects created using <jsp:useBean> tag is page. JSP implicit objects out, exception, response, pageContext, config and page have ‘page’ scope. - request
A JSP object created using the ‘request’ scope can be accessed from any pages that serves that request. More than one page can serve a single request. The JSP object will be bound to the request object. Implicit object request has the ‘request’ scope. - session
‘session’ scope means, the JSP object is accessible from pages that belong to the same session from where it was created. The JSP object that is created using the session scope is bound to the session object. Implicit object session has the ‘session’ scope. - application
A JSP object created using the ‘application’ scope can be accessed from any pages across the application. The JSP object is bound to the application object. Implicit object application has the ‘application’ scope.



















sdf
dsf on July 24th, 2010 7:11 amHi,Your explanation about scope of jsp objects is very good.It is very helpful to me.I found the clear information about the jsp objects scope.
Thanks….Keep Posting similar articles.
Muralidhar on October 4th, 2010 10:02 amexpalain in detail
Anonymous on October 10th, 2010 7:52 amExcellent!
Nishit Shah on November 25th, 2010 3:04 pmYour explanation about the JSP scope objects is really good.
ANAND on December 28th, 2010 8:33 amBut if i’m not going to use <jsp:useBean tag in the form then what will be scope of the jsp page.Is it page or else any other scope from the remaining.
its true…………..
sushma on April 17th, 2011 3:07 pmjsp:tags in detail??????/
sushma on April 17th, 2011 3:09 pmthank for good explanation;
Anonymous on April 26th, 2011 2:33 pmshohag
very nice explanation…
thank you Joe
ramesh on April 28th, 2011 11:01 amexellent explanation….
Jyotshna Pardhia on May 16th, 2011 11:28 amits really a useful article…
thnks..
exellent explanation….
sam on May 25th, 2011 10:59 amit is not a good example……
nik on June 6th, 2011 9:32 amHi,
Scope of JSP Objects are
1.request
SHOWNISHA on June 22nd, 2011 9:34 am2.responce
3.application
4.session
5.out
6.config
7.pagecontet
8.page
9.exception
Hi,
I read your article easy to understand for freshers and usefulll…
do the needful thro out your life
SHOWNISHA on June 22nd, 2011 9:37 amHi SHOWNISHA,
The list you had given above are JSP implicit objects. You are mistaken that with the scope of JSP object.
Sunitha PV on June 24th, 2011 9:17 amStellar work there eveoynre. I’ll keep on reading.
Janese on August 14th, 2011 6:39 pmTO Shownisha: Hi, 9 objects which you had listed out were not scope of the JSP objects, they are implicit objects. What joe mentioned those 4 are scopes
rajasekhar on August 21st, 2011 4:04 amthanks,
Hiren Raiyani on October 17th, 2011 3:52 amHi…
bhg dfh f g dh
fgd df
hfghfhf
Joe on November 3rd, 2011 9:22 amcould u pls send example for each scope objects in jsp
syamsunder on November 17th, 2011 6:54 amgood one.
Krishna Mohan on December 26th, 2011 10:14 amI LIKE JAVA VERY VERY MUCH,I ALSO JAVA SE 6 CERTIFIED PROFESSIONAL(OCJP 6). GIVE NEXT STEP FOR MY BRIGHT FUTURE…
NARASIMHA on January 10th, 2012 12:13 pm