File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes body-content for tag files, classic and simple 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 for tag files, classic and simple tags" Watch "body-content for tag files, classic and simple tags" New topic
Author

body-content for tag files, classic and simple tags

Niranjan Deshpande
Ranch Hand

Joined: Oct 16, 2005
Posts: 1277
for tag files the following values are valid as <body-content>

empty
tagdependent
scriptless (default)

tag files cannot use scripting, but the tags, that invloke the tag files, can have scripting in their bodies.


for classic tags, the following values are valid as <body-content>

empty
tagdependent
scriptless
JSP

whats the defualt ???

for simple tags, the following values are valid as <body-content>


empty
tagdependent
scriptless

in jsp1.2, JSP was the default value for <body-content>, but the 2.0 spec has dropped JSP as body-content completely. so whats the default value ??? nothing...! for simple tags, you must specify the body-content, else you get a error ( any one confirm this )


SCJP 1.4 - 95% [ My Story ] - SCWCD 1.4 - 91% [ My Story ]
Performance is a compulsion, not a option, if my existence is to be justified.
Stella Kim
Greenhorn

Joined: Jan 18, 2007
Posts: 25
..I think there is no speicific default body-content for custom tags. It just depends on how you specify the <body-content> element in TLD.
For custom tag(simple tag, custom tag), the <body-content> is required, (mandatory) in TLD.

For tag file, it has a default value of 'body-content' which is 'scriptless'. The tag file 'body-content'is not defined in TLD, rather, it's defined inside the tag file itself using <%@ tag > directive, for example, <%@tag body-content="tagdepent" %>.

For a custom tag, the <body-content> element inside the TLD is mandatory, but a Tag File doesn't have to declare <body-content> if the default (scriptless) is acceptable. As with Simple tags, the Tag File body cannot be scripting either as you mentioned.


Kim<br />SCJP 1.4 (98%)<br />SCWCD (92%)
Niranjan Deshpande
Ranch Hand

Joined: Oct 16, 2005
Posts: 1277
some confirmations ?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: body-content for tag files, classic and simple tags