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

taglib ques from j2eeCertificate.com

 
mallika shah
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A question from j2eeCertificate:-

Which of the following statements are true about the taglib directive? [Check all correct answers]

1. The uri element can only contain an absolute URI that identifies a tag library.

2. The uri element can only contain a relative URI that identifies a tag library.

3. The prefix element indicates a unique string.

4. The following prefixes cannot be used: java,servlet and sun.

5. If the uri contains an absolute path to a jar file then all handler classes should be included in the jar file and cannot be defined in the web-application classpath.

Answers are 3,4 and 5

HOW IS 5 COREECT?

thanks,mallika
 
Tridib Samanta
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think option 5 is right. I tested the following scenario. It works perfectly.

1. I defined a s simpel tag and placed in WEB-INF/classes directory.
2. Built a jar file mylib.jar and placed the TLD named taglib.tld in the META-INF directory of the jar file.
3. In JSP, i declared <%@ taglib prefix="mytag" uri="WEB-INF/lib/mylib..jar" %>


Does anybody have any definite answer? I am confused too.
[ April 05, 2007: Message edited by: Tridib Samanta ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic