Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt on optional scope attribute

 
Veena Pointi
Ranch Hand
Posts: 442
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In HFSJ page 457 there is a question .It was in context to <c:set tag

Q : If I don't specify scope,does that mean it will find attributes that are only within page scope,or will it do a search beginning with page scope?

Ans : If you don't use the optional scope attribute in the tag,then the tag will only look in the page scope space . Sorry,you will just have to know exactly which scope you are dealing with.

I am confused with this explanation .
Is it trying to say default scope is page? I understand if we don't specify scope in c:set it sets/adds attribute in page scope by default.But I didn't understand what the above explanation is trying to convey.

Can anybody shed some light on this.

Thanks
Veena

>
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Q : If I don't specify scope,does that mean it will find attributes that are only within page scope,or will it do a search beginning with page scope?

Is this question about c:set ? I don't understand why they refer to finding attributes. c:set just set things, it doesn't look for anything.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65335
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you still not downloaded the JSTL Specification? it answers all of these trivial questions.
 
avi sinha
Ranch Hand
Posts: 453
Google Web Toolkit Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Veena Pointi wrote:
Is it trying to say default scope is page?
>


yes .
default for a scope attribute is always the page scope.

avi sinha
 
ramakrishna kulkarni
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They are just trying to say that you have to specify the scope to which you are binding attribute. If you do not default is page scope.
I hope I clear with this concept
 
Veena Pointi
Ranch Hand
Posts: 442
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By default c:set will bind attribute to page scope is clear to me .

Is this question about c:set ? I don't understand why they refer to finding attributes. c:set just set things, it doesn't look for anything.


Yes Christopher .This question is about c:set . I also didn't understand why they specified about finding attributes .That is why I posted this question to know if I am missing to understand something.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic