| Author |
why we need page scope
|
vijay saraf
Ranch Hand
Joined: Jan 08, 2005
Posts: 141
|
|
Hello All , if i declare a bean in a jsp then by default it will be visible to that page,then setting scope as page;what addition functionalties will adds to it.i just mean to ask what addtional functionalties are there in page scope that are not with default( means no scope). Thanks, Vijay Saraf.
|
Thanks
Vijay Saraf.
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14672
|
|
Default is page scope, not "no scope". You will use a page scope when some information does not need to be used outside the current page.
|
[My Blog]
All roads lead to JavaRanch
|
 |
vijay saraf
Ranch Hand
Joined: Jan 08, 2005
Posts: 141
|
|
That is fine. but suppose i am not defining any scope in <jsp:useBean> then still that bean instance is avialable any where in that page. and again if i define scope as page then the visibility of bean is same. i just wanted to know is there any diffrence or not. Thanks, Vijay Saraf.
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14672
|
|
Did you read the spec about <jsp:useBean> ? If you do not explicitly set the scope to scope="page", then default is scope="page". No difference.
|
 |
 |
|
|
subject: why we need page scope
|
|
|