wood burning stoves 2.0*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Doubt on Q54 in final Mock HFSJ Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Doubt on Q54 in final Mock HFSJ" Watch "Doubt on Q54 in final Mock HFSJ" New topic
Author

Doubt on Q54 in final Mock HFSJ

muthu kumaran
Ranch Hand

Joined: Oct 26, 2004
Posts: 56
Hi Guys,
I have doubt on the Q54

Given a tag library discriptor located at /mywebapp/WEB-INF/tlds/mytags.tld, which could be the correct taglib directive ? Assume that /mywebapp is the web application root and there is no <taglib>
tag in the Deployment descriptor

Option C is given as correct one

I feel Options A, B , C ,D are correct

which has the uri=/WEB-INF/tlds/mytags.tld

The reason given is other options though having the correct taglib directive syntax
don't have the "uri" similar to option C

The explanation puzzles me , bcoz in HFSJ when describing the taglib directives, it says that
the uri is just a means to resolve namespace issues and they NEED NOT point to the location of TLD file.( Page 474 HFSJ)

Could anyone explain me regarding this ?


Thanks in Advance
Muthu
muthu kumaran
Ranch Hand

Joined: Oct 26, 2004
Posts: 56
Bert,
Can you clear my doubt ?

Thanks
Muthu
muthu kumaran
Ranch Hand

Joined: Oct 26, 2004
Posts: 56
Could the authors of HFSJ explain the anomaly ? Is it that the answer for that question is wrong? or is it the concept mentioned about the "uri" wrong ?
Ranjani Theyagarajan
Greenhorn

Joined: Feb 08, 2006
Posts: 19
The JSP specs says that "uri can be either an absolute URI or a relative URI which should be unique."

In the question it is given taglib is not specified in the DD
so we need to map it to the absolute path.
Bryan Basham
author
Ranch Hand

Joined: Apr 30, 2001
Posts: 199
Hello,

Yes, one could argue that the question is ambiguous because the 'uri' attribute could be mapped to any of these strings within the TLD file itself. However, the spirit of the question is: "what if the web container could not automatically find the TLD file; what would you use in thr 'uri' attribute that would tell the container where to find the TLD file." In that spirit, then only option C is correct.

Sincerely,
Bryan Basham
muthu kumaran
Ranch Hand

Joined: Oct 26, 2004
Posts: 56
Bryan,
If the question were to be like what you said

"what if the web container could not automatically find the TLD file; what would you use in thr 'uri' attribute that would tell the container where to find the TLD file.
"

then ofcourse Option C would be the right option, but the question is a little ambiguous .Also the explanation provided provides a wrong notion

It says
" In the absence of a <taglib> element in DD the 'uri' must be a full path
relative to the application root"

may be the explanation could have been more precise.

Anyway , thanks for clearing my doubt Bryan

Regards,
Muthu
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Doubt on Q54 in final Mock HFSJ
 
Similar Threads
TLD uri doubt
HFSJ final mock exam quetion 54 - taglib and uri
<taglib> and uri doubt
Exam question errata? help please
Doubt on HFSJ Final Mock Exam