• 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

body-content to be JSP

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 252
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Isha Garg
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply Nidhi.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic