File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes doubt on body-content 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 "doubt on body-content" Watch "doubt on body-content" New topic

doubt on body-content

muthu kumaran
Ranch Hand

Joined: Oct 26, 2004
Posts: 56
I have some doubt on the <body-content> for the <tag> element in DD.
What is the default value of <body-content> for Simple Tags.

I had a problem when working with Simple Tags in Tomcat.
If I don't specify <body-content> for a Simple Tag, the container(Tomcat in this case) takes JSP as the default value for <body-content>.

But since Simple Tags don't support JSP as their body-content , I get compilation error.

So IS <BODY-CONTENT> a mandatory tag for Simple Tags , but not for Classic ones ?
Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

From TLD 2.0:
Specifies the format for the body of this tag.
The default in JSP 1.2 was "JSP" but because this
is an invalid setting for simple tag handlers, there
is no longer a default in JSP 2.0. A reasonable
default for simple tag handlers is "scriptless" if
the tag can have a body.

So you'd better set it to "scriptless" if you're not using the body.

[My Blog]
All roads lead to JavaRanch
I agree. Here's the link:
subject: doubt on body-content
It's not a secret anymore!