| Author |
body-content to be JSP
|
Isha Garg
Greenhorn
Joined: Mar 12, 2010
Posts: 29
|
|
Hi All,
I have a doubt regarding body-content.
According to HF Page-482, The possible values for body-content are empty/tagdependent/scriptless/JSP.
If i make body-content to be JSP in my .tld file, then my understanding says that I can have scriptlet in the body of my tag.
But When I make body-content to be JSP in my tld file, then I ger following exception
JasperException: The TLD for the class foo.AdviceTagHandler specifies an invalid body-content (JSP) for a SimpleTag.#
It does not even identify JSP body content.
My AdviceTagHandler extends SimpleTagSupport.
Can you please tell me how can I have scriptlets in the body of my tag.
|
 |
Nidhi Sar
Ranch Hand
Joined: Oct 19, 2009
Posts: 252
|
|
Isha Garg wrote:
According to HF Page-482, The possible values for body-content are empty/tagdependent/scriptless/JSP.
Hi Isha,
Actually if you read the page carefully, here is what it says:
"The <body-content> element can be one of either three or four values, depending on the type of tag."
I believe the following allow JSP body-content:
- Custom tag handlers that extend Classic tag classes (TagSupport & BodyTagSupport)
- JSTL
The following support body-content to be empty/ tagdependent/ scriptless but NOT JSP
- Custom tag handlers that extend Simple tag class (SimpleTagSupport)
- Tag files
|
"A problem well stated is a problem half solved.” - Charles F. Kettering
SCJP 6, OCPJWCD
|
 |
Isha Garg
Greenhorn
Joined: Mar 12, 2010
Posts: 29
|
|
|
Thanks for your reply Nidhi.
|
 |
 |
|
|
subject: body-content to be JSP
|
|
|