• 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

Tag bodies and JspFragment

 
Ranch Hand
Posts: 58
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'd be grateful if someone could clear up this confusion for me:
Possible values for the tag are:
empty, scriptless, tag-dependent, and JSP.

SimpleTag's setJspBody() method takes a JspFragment.
JspFragment can't contain any scripting elements.

Presumably that means that you can never declare the of a simple tag to be "JSP", and therefore only classic tags can contain scripting elements in the body?

Or am I missing something?

thanks,

Gordy
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Simple tags can be empty or scriptless. Scripting elements (in other words, scriptlets) cannot be used in the body of simple tags.

In other words, either write your tags using JSP 1.x features: classic tags and scriptlets, or write them using JSP 2.0 mechanisms: simple tags, tag files and JSTL/EL.

Don't mix and match.
 
Gordon Brown
Ranch Hand
Posts: 58
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Gotcha, thanks Bear.

Gordy
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic