wood burning stoves*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Body content type for custom tags 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 "Body content type for custom tags" Watch "Body content type for custom tags" New topic
Author

Body content type for custom tags

tanzeel rais
Greenhorn

Joined: Feb 20, 2007
Posts: 5
I am referring to HFSJ 2nd edition pdf version.

In chapter 9 ,it says that body content of a custom tag can have either of the four values
1.empty 2.scriptless 3.tagdependent 4.jsp

But in chapter 10 ,while dealing with tag handlers for these custom tags , for a Simple tag handler ,the tag body is processed using the setJspBody(JspFragment) method.And it says that JspFragment cannot have scripting elements.

Does this imply ,that only tag bodies invoked by a Classic handler can have all 4 types of body content , and while with Simple handler only 3 types excluding jsp type as no scripting elements allowed.
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9291
    
  17

tanzeel rais wrote:Does this imply ,that only tag bodies invoked by a Classic handler can have all 4 types of body content , and while with Simple handler only 3 types excluding jsp type as no scripting elements allowed.

Yes that's correct...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Body content type for custom tags
 
Similar Threads
Is Scripting allowed in Simple and Custom Tag Body?
Regarding Tag libraries
Scripting in Simple and Custom Tag Body
what can be in a tag body?
JspFragment