There were many
thread in this forum related to default value of body-content.
I tried few examples and have following question
If spec says <body-content> is mandatory, how am I be able to run custom tag without <body-content> in TLD
CASE 1:
Custom tag extends SimpleTagSupport
no <body-content> mentioned in TLD
Result:
HTTP status 500
The TLD for the class example.TextTag specifies an invalid body-content (
JSP) for a SimpleTag.
This means by default it takes JSP as default value for body-content. Since SimpleTags cannot have scriptless, it says "JSP" is not a valid body-content.
CASE2:
Custom tag extends TagSupport
no <body-content> mentioned in TLD
JSP had expression within body of tag
Result:
Expression in body of tag got evaluated.
When expression got evaluated, it means <body-content> is JSP
Please clarify me on this.