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?
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
posted
0
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
posted
0
Yes
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.