Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Doubt on optional scope attribute

 
Ranch Hand
Posts: 469
  • 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

>
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • 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.
 
Sheriff
Posts: 67401
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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.
 
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
 
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: 469
  • 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.

 
Why am I so drawn to cherry pie? I can't seem to stop. Save me tiny ad!
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic