• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

body-content Doubt !!!

 
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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???
 
Ranch Hand
Posts: 572
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, Ali its case sensitive.
 
Ranch Hand
Posts: 105
Android Mac Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic