• Post Reply Bookmark Topic Watch Topic
  • New Topic

use of page scope

 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the use of page scope???

Given that, pageContext refers to page.
 
geeta lalchandani
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can use the <c:set /> tag and set the scope to 'page'.
the variables can then be accessed using jstl, so that the search is nt made in all scopes.
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by geetu lalchandani:
you can use the <c:set /> tag and set the scope to 'page'.
the variables can then be accessed using jstl, so that the search is nt made in all scopes.


Geetu, not clear.
 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

What is the use of page scope???


Attributes set in page scope are accessible only in that page.
 
geeta lalchandani
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Geetu, not clear.


When you want to have parameters that should be restricted only to the page. What would you use?? Request scope will allow the parameters to be accessible across pages(say include).In ths case you can set the variables in the page scope, and you can use <c:set /> to put those parameters in.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!