Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

a qstn on tag

 
tony wang
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What about this question:
If the Taglibrary descriptor has the following entry for the tag in question:
<attribute>
<name>aParam</name>
<required>true</required>
</attribute>
And the tag is used as follows:
<m:aTag />
What happens?
A Error complains that the attribute is mandatory
B Page compiles but is blank
C Page compiles and the tag is omitted
D None of the above
Answer is A.
Checked in jsp spec: require subelement is about "The value of the required element indicates if the nesting attribute is required or optional." But I don't think it's the reason
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<required> ..this elemet can be optional but once the value of the element is "true" then the tag must have the attribute. thats why option A is correct
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic