• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Javabeat question: body-content

 
Chandra Bhatt
Ranch Hand
Posts: 1710
  • Mark post as helpful
  • send pies
  • 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,
 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
Michael Ku
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic