• 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

HFSJ- Custom Tag dev - Q 17

 
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

This is about a question in Chapter 10 of HFSJ. The question goes like this.

Given a tag, SimpleTag, whose handler is implemented using the Simple tag model and a tag, ComplexTag, whose handler is implemented using the Classic tag model. Both tags are declared to be non-emply in the TLD.

Which JSP code snippets are valid uses of these tag?




And the correct option is ambiguous. The book says, Option A is correct.

A.
<my:simpleTag>
<my:complexTag/>
</my:simpleTag>



How can this be correct..?? Simple tag has a body... but what about complex tag.?? According to TLD it should also have the body.

Please suggest.
 
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It can have a body but it doesn't have to.
 
Prasad Tamirisa
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Musab Al-Rawi:
It can have a body but it doesn't have to.



This is contradictory to the following.

Both tags are declared to be non-emply in the TLD.

 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic