• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doubt in custom tag mock ques 17 HFSJ page:557

 
Aditya Singh
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • 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.
 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • 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
 
John Pearson
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic