• 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

JspFragment

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
In HFS&J page 512:
"The body of a tag that invokes a simple tag handler is encapsulated in the JspFragment object"
and the next line:
"The crucial thing you must remember about JspFragment is that it must NOT contain any scripting elements"
Just wondering what will happen if i set the body-content to JSP
<body-content>JSP</body-content> (that will allow scripting in the body of a tag)
Help me, please!!
thanks
 
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI,

A TLD is invalid if it specifies "JSP" as the value for <body-content> for a tag whose handler implements the SimpleTag interface. JSP containers are recommended to but not required to produce an error if "JSP" is specified in this case.

Hope that helps.

Sawan
 
Hung Sam
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sawan,
Thanks for the reply.
But in Chapter 9 (HFS&J) page 472, it says that a <body-content> element can be:
+ empty
+ scriptless
+ tagdependent
+ JSP
is it an error? or did i miss-interpret it?

Thanks
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
for Simple custom tags and Tag files the body-content entries are "scriptless/tagdependent/empty" for Classic custom tags its "JSP/empty/ tagdependent"
 
sawan parihar
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
If I remember specs correctly there is nothing written about the body content of the Simple tags . That means it depends upon the implementation. But again i think in most of the implementations it will be "scriptless/tagdependent/empty".

Hope that helps.

sawan
 
reply
    Bookmark Topic Watch Topic
  • New Topic