Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JspFragment

 
Hung Sam
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • 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
 
sawan parihar
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
Naresh Arige
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic