Hi,
The source for this qn is enthuware.
Qn :- You have a
JSP page that contains the following taglib directive for accessing tags of a tag library developed by ABC, Inc.:
<%@ taglib prefix="
test" uri="
http://abc.com/graphs/graphlib.jar">
Further, the tag library is shipped to you in the form of a jar file named graphlib.jar.
You've kept this jar file in WEB-INF/lib directory of your web application.
Which of the following lines will you add in the deployment descriptor so that your jsp page can access the tags of the library?
1) <taglib>
<taglib-uri>
http://abc.com/graphs/graphlib.jar</taglib-uri>
</taglib>
2)<taglib>
<taglib-uri>
http://abc.com/graphs/graphlib.jar</taglib-uri>
<taglib-location>/lib/graphlib.jar</taglib-location>
</taglib>
3)There is no need for a <taglib> element in web.xml, as the library will be downloaded from
http://abc.com/graphs/graphlib.jar
4)None of these
5)<taglib>
<taglib-uri>
http://abc.com/graphs/graphlib.jar</taglib-uri>
<taglib-location>lib/graphlib.jar</taglib-location>
</taglib>
Answer is 5. But my guess was 4) as there is no need to declare in web.xml for JSP 2.0.
Please help me in understanding.