File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes taglib descriptor  doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "taglib descriptor  doubt" Watch "taglib descriptor  doubt" New topic
Author

taglib descriptor doubt

naresh govindaswmay
Ranch Hand

Joined: Aug 15, 2007
Posts: 90
hi,
I have founf this question in Enthuwere.

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.

a.JSP

b.jsp

c.any

d.text

d.The <body-content> subelement itself may be absent.

I have selected answer is B.because while reading the jsp tag in the jsp file we should give the body content is jsp in tld file rite.but they are giving answer is d.for that they given explanation also.I am not able to understand that one.here I have attached explanation also here. please any body clear this confusion.



If it is absent, JSP is assumed which is OK!


Thanks and Regards<br />Naresh govindaswamy
Sandeep Krish
Ranch Hand

Joined: Jan 02, 2007
Posts: 58
The answer is A. It must be caps.
See this for more
carina caoor
Ranch Hand

Joined: Jun 23, 2007
Posts: 300

correct options are a and d coz body-content default value is JSP. If body-content is not present it considers it to be JSP.
Jan van Mansum
Ranch Hand

Joined: Oct 19, 2007
Posts: 74
Originally posted by ruquia tabassum:
correct options are a and d coz body-content default value is JSP. If body-content is not present it considers it to be JSP.


That is not correct. The body-content element is mandatory; there must be exactly one in every tag element.


SCJP 1.4, SCWCD 1.4
naresh govindaswmay
Ranch Hand

Joined: Aug 15, 2007
Posts: 90
HI,
I red some where in books <body-content> tag default value is "scriptless".Please make me clear on this..
Sandeep Krish
Ranch Hand

Joined: Jan 02, 2007
Posts: 58
This is were you read it.
Jan van Mansum
Ranch Hand

Joined: Oct 19, 2007
Posts: 74
Originally posted by Sandeep Krish:
This is were you read it.


In the tag library descriptor file (the .tld file) the body-content element is mandatory. You are referring to the body-content attribute of the tag directive in a tag file. This attribute defaults to "scriptless" and not "JSP", by the way. "JSP" is not even allowed, as tag files are translated to tag handlers implementing the SimpleTag interface, which disallows body-content "JSP".

Please refer to JSP 2.0 specs Figure JSP.C-3 (p. 3-17) and Table JSP.8-2 (p. 1-180).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: taglib descriptor doubt