• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Method Used in Tag Handler Class To Access JSP's Attributes

 
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This question is from the SCWCD@Whiz trial: what is the method used in tag handler class to access JSP's attributes?
I think the answer is setAttribute_Name given that the attribute is required and provided in the JSP. But the correct answer provided is getAttribute_Name.
What is wrong with my understanding of the question or what is wrong with my understanding of accessing JSP's attributes?
 
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That may be because, setAttribute_Name is called by the container before invoking the tag handler's methods. Then the tag handler can call getAttribute_Name to find out what was specified at the JSP page level.
Does this reasoning make sense?
------------------
Velmurugan Periasamy
Sun Certified Java Programmer
Sybase Certified EAServer Developer
----------------------
Study notes for Sun Java Certification
http://www.geocities.com/velmurugan_p/
 
reply
    Bookmark Topic Watch Topic
  • New Topic