• 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
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

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

 
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
  • 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
  • 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/
 
What are you doing in my house? Get 'em tiny ad!
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic