aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes So where are scriptlets never allowed? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "So where are scriptlets never allowed?" Watch "So where are scriptlets never allowed?" New topic
Author

So where are scriptlets never allowed?

warren li
Ranch Hand

Joined: May 23, 2006
Posts: 128
The body of the tag that is a TAG FILE can not have scriptlets.

The body of a simple tag that extends SimpleTagSupport can not have scriptlets, because its body is a JspFragment that does not allow scriptlets.
So does this mean this is illegal for a simple tag tld:
<body-content>JSP</body-content>
?


What about classic Tag handler that extends TagSupport and BodyTagSupport? Can we put scriptlets in the tag body?


SCBCD 1.3: 94%<br />SCWCD 1.4: 91%<br />SCJP 5: 95%
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

So does this mean this is illegal for a simple tag tld: <body-content>JSP</body-content> ?

JSP is an illegal value for the <body-content> tag.


[My Blog]
All roads lead to JavaRanch
Ali Gohar
Ranch Hand

Joined: Mar 18, 2004
Posts: 572
What about classic Tag handler that extends TagSupport and BodyTagSupport? Can we put scriptlets in the tag body?


Yes you can specify body content as "JSP" which includes anything you can write in a jsp file.
warren li
Ranch Hand

Joined: May 23, 2006
Posts: 128
Thanks for all the answers. So am I right to say that only classic tag handlers can have scriplets in the tag body, while tag files and simple tags cannot?
Ali Gohar
Ranch Hand

Joined: Mar 18, 2004
Posts: 572
Yes
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: So where are scriptlets never allowed?