• 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:

doubt in custom tag mock ques 17 HFSJ page:557

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Question 17 on Custom tags declare tags as non-empty and tagdepedent which means body of tag will be treated as text only, It can be script, EL or whatever but in Answer they say SimpleTag can't have scripting code inside body!!!. I am confused, Please clearify.

Thanks in advance.
 
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

the custom tags can have like body content :
empty, scriptless, tagdepedent - the classic tags can have extra the JPS.
The custom tags can have an empty body, you can define the tag's body type with the "body-content" attribute from the tag directive (available only for the tag files).
Take a look on the JSP specification (on 1-177 for the jps_2_1).

Regards,
M
 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was just looking at that question in HFSJ, and I don't see anything about the tag body being tagdependent. If it really did specify tagdependent, then I think you'd be right that it could have whatever it wanted as the body.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic