Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HFSJ Final Mock Question 54

 
Grace Yang
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
54. tag library descriptor located at /mywebapp/WEB-INF/tlds/mytags.tld, which would be correct taglib direct? Asssume mywebapp is the web app root and that there are no <taglib> tags in the DD
a. <%@ taglib uri=�/mytags.tlds� prefix=�my� %>
b. <%@ taglib uri =�/tlds/mytags.tld� prefix=�my� %>
c. <%@ taglib uri =�/WEB-INF/tlds/mytags.tld� prefix=�my� %>
d. <%@ taglib uri =�/appwebapp/WEB-INF/tlds/mytags.tld� prefix=�my� %>
e....
The anwser is C.

I've done quite a bit of codes on the custom tags excercise. As long as the uri="XXXX" in my JSP file matches with <uri>XXXX</uri> in tag library descriptor, it works. So I think option a, b, c, d should be all valid.

Please correct me if I am wrong.

thanks
 
Renu Radhika
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But for tha you are not given the tld.So you have to assume that there is no uri in tld in which case jsp takes the uri in directive as the actual location of tld
 
Tiffiny Yang
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Renu :

Are you saying that when uri is not given uri in the tld, and there is no <taglib> in web.xml, then it must be specify full file location in jsp file like this :
<%@ taglib uri =�/WEB-INF/tlds/mytags.tld� prefix=�my� %>

Besides: I do not see the implication of the saying that there is no given url in the tld, it's only clearly stated that no <taglib> in web.xml.

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic