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.
Joined: Oct 21, 2005
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
Joined: Mar 29, 2006
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.