• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

getAttributeScope(String name)

 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there the getAttributeScope(String name) method in PageContext?

there is a qtn, in HF (Page- 565)

Which are valid method calls on a PageContext object ?
Answers:
B. getAttribute("key")
C. findAttribute("key")
E. getAttributeScope("key")
G. getAttribute("key", PageContext.SESSION_SCOPE)
 
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think E should be getAttributesScope
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

There is a method getAttributesScope(String name) which returns the scope of the attribute.
 
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
int getAttributesScope("myAtt");
Get the scope where a given attribute is defined.

Also
Enumeration getAttributeNamesInScope(int scope)
Enumerate all the attributes in a given scope.
 
Renu Radhika
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But then what is the purpose of findAttribute method,I guess that also will do the same thing??
 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Renu Radhika:
But then what is the purpose of findAttribute method,I guess that also will do the same thing??




getAttribute method with only string argument returns object associated with the string in pageScope only ,While findAttribute(String) method will search in page,request, session ,application in this order
it will return one if it finds the object associated else return null.
reply
    Bookmark Topic Watch Topic
  • New Topic