Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

body-content Doubt !!!

 
Siddharth Purandare
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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???
 
Ali Gohar
Ranch Hand
Posts: 572
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, Ali its case sensitive.
 
Johan Pelgrim
Ranch Hand
Posts: 105
Android Java Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic