aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes body-content Doubt !!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "body-content Doubt !!!" Watch "body-content Doubt !!!" New topic
Author

body-content Doubt !!!

Siddharth Purandare
Ranch Hand

Joined: Nov 13, 2006
Posts: 101
Hi All,

I was just going through the J-discuss Tests and got the following question.

Problem

For a tag to accept any valid jsp code as its body, what should be the value of <body-content> for this tag's taglib descriptor?

Options (Select 1 correct option)

1.JSP
This would have been correct for 1.2 but this is not a valid value for 1.3 anymore.

2.jsp

3.any

4.text

5.The <body-content> subelement itself may be absent.
If it is absent, JSP is assumed which is OK! (CORRECT ANSWER)


The answer is option 5 as shown above BUT my question is about the explanation given in the first option. is the <body-content>JSP</body-content> NOT VALID ANYMORE???


Siddharth Purandare<br />SCJP 1.4 - 76%<br />SCWCD 1.4 - 85%<br /> <br />It is the "attitude" and not the "aptitude" which determines "altitude".
Ali Gohar
Ranch Hand

Joined: Mar 18, 2004
Posts: 572
Is there any difference in Option 1 and Option 2? Does case matters? i think "JSP" or "jsp" is one of the same thing and its a valid for body-content.

Please correct me if i am wrong.
Siddharth Purandare
Ranch Hand

Joined: Nov 13, 2006
Posts: 101
Yes, Ali its case sensitive.
Johan Pelgrim
Ranch Hand

Joined: Jul 07, 2003
Posts: 105

My 2 cents...

Are you preparing for CX-310-080 (J2EE 1.3) or CX-310-081 (J2EE 1.4)?

If you preparing for CX-310-080 (J2EE 1.3) JSP1.2 is part of the J2EE 1.3 specification and not JSP 1.3 (in my view). So you should check that specification.

If you are preparing for the latter you need to check the J2EE 1.4 API and XSDs and DTDs. In the J2EE 1.4 specification neither the 1.2 or 1.3 JSP (and taglib) specification is used, but 2.0!

From the JavaServer Pages 2.0 Specification page 1-180:
body-content (optional) Provides information on the content of the body of this tag. Can be either empty, tagdependent, or scriptless. A translation error will result if JSP or any other value is used. Defaults to scriptless.

So... Please check the expiration date of that J-discuss test thingie... Maybe you need to go for a more recent trainer?! ;-)
[ December 05, 2006: Message edited by: Johan Pelgrim ]

Johan Pelgrim, The Netherlands
SCJP 1.4, SCWCD 1.4, SCBCD 5.0
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: body-content Doubt !!!
 
Similar Threads
Javabeat question: body-content
body-content doubt
body content related
About body-content tag of TLD
Please check....