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  confuse. 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  confuse." Watch "body-content  confuse." New topic
Author

body-content confuse.

Anna Wang
Ranch Hand

Joined: May 26, 2006
Posts: 30
Hello, everyone,

From HFSJ P. 472, it shows:
<body-content> can be: empty, scriptless, tagdependent, JSP in a tag.
I was wondering what is the default value if No <body-content>, is it JSP, right?(I remember I saw this somewhere, not sure)

So, If the tag is simple tag or classic tag, what's the value of <body-content>? Still those four value(empty, scriptless, tagdependent, JSP)? I am confused in this question:

<my:simpleTag>
<%= display %>
</my:simpleTag>

is invalide because body includes a JSP expression.

Can anybody explain this? Thank you very much.

Anna
Rajat Gupta
Greenhorn

Joined: Sep 16, 2005
Posts: 7
I guess <body-content> is a required while specifying the <taglib> in DD. If you don't have it defined, its an error. Hence, the default value doesn't exist. Please correct me if I am wrong.

Regards,
Rajat Gupta
Sivasundaram Umapathy
Ranch Hand

Joined: Aug 10, 2002
Posts: 360
JSP was the default value for <body-content> in JSP 1.2 spec. But in JSP 2.0 spec, this was changed and there isn't a default value any more.


Siva
Co-Author - SCMAD Exam Guide - ISBN:9780070077881
Author - Java certification success, Part 4: SCEA
Anbu Rajendran
Greenhorn

Joined: Aug 09, 2006
Posts: 18
The body content of a simple tag is a JspFragment.
A JspFragment cannot contain scriptlets. So a
simple tag cannot have scriptlets in its tag.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: body-content confuse.