• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Javabeat question: body-content

 
Ranch Hand
Posts: 1710
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

26.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?

Select 1 correct option.
A.JSP
B.jsp
C.any
D.text
E.The <body-content> subelement itself may be absent.

ANS : E



Could someone please tell, why is this answer 'E'?
I know the default <body-content> is scriptless. Is that right?


Source of this question


Thanks,
 
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

What is the type of the tag ? If it's a tag file, yes it can be missed because the default is scriptless.

For Simple and Classic tags, there's no default value for the body content, as Simple tags don't support JSP, so you have to define one explicitly.

Also note that tag file don't accept JSP as the body content.

Good luck ...
 
Chandra Bhatt
Ranch Hand
Posts: 1710
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Vassili,

It means the question is incomplete. It should have mentioned the type
of tag. For Classic tag only, JSP may be a value for <body-content> element.
 
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For Classic tags and JSP 2.0 the answer "E" is correct. for JSP 1.x you would indicate "JSP". The release level matters.

This question may be on the exam
 
My first bit of advice is that if you are going to be a mime, you shouldn't talk. Even the tiny ad is nodding:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic