• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

No scripting inside tag body?

 
warren li
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"No scripting inside tag body", because the <body-content> in tld is default scriptless. Does this only apply to simple tags and tag files? or all tags? Because I certainly have used scripting inside tags before, e.g. those struts tags and JSTL tags.

Someone please clarify. Thanks.
 
Tridib Samanta
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out the tld files available in the jar files used for struts and jstl.
If you found


that means your tag library uses JSP1.1. In JSP 1.1 the deafuls body-content type is "JSP".

In case your tags are JSP 2.0 compliant, the tld must specify the body-content as "JSP" in case it allows scriptlets.
 
Ali Gohar
Ranch Hand
Posts: 572
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
scriptless is the default for <bod-content> of Simple tags and tag files whereas for classic tags <body-content> is mandatory and hence there is no default value for it.

This is for JSP 2.0
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic