• 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

help please Tags...

 
Greenhorn
Posts: 15
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello javaranch staff, I would like to see if someone can help I can understand this issue of simulated ... even after you see the answer ... please if someone could explain

A custom JSP tag must be able to support an arbitrary number of attributes
whose names are unknown when the tag class is designed. Which two are true? (Choose two.)

A. The <body-content> element in the echo tag TLD must have the value JSP.
B. The echo tag handler must define the setAttribute(String key, String value) method.
C. The <dynamic-attributes>true</dynamic-attributes> element must appear in the echo tag TLD.
D. The class implementing the echo tag handler must implement the javax.servlet.jsp.tagext.IterationTag
interface.
E. The class implementing the echo tag handler must implement the javax.servlet.jsp.tagext.DynamicAttributes
interface.


the answer is: C, E
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi. Can you quote your sources ?
 
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
which book are you reading for the exam?
 
Ranch Hand
Posts: 170
Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
to use dynamic attributes (atrributes not defined in TLD) you must
first add the <dynamic-attributes> in the tag TLD and set it to true.
then you must implement the javax.servlet.jsp.tagext.DynamicAttributes
inteface. this inteface have one single method:
setDynamicAttribute(String uri, String name, Object value);
this method is called whenever an "unknown" attribute is found in the tag
and the most common way to use it is to add the name-value pair to a
hashMap<String,Object>.
notice that the value is an object since dynamic attributes can get EL expressions.
(for most purpose, uri can be null...)
 
Thalys de Aguiar Gomes
Greenhorn
Posts: 15
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Harvinder Thakur wrote:which book are you reading for the exam?



the book is head first servlets & jsp
&
310-083ePad.exe
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic