my dog learned polymorphism*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes About taglib.tld Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "About taglib.tld" Watch "About taglib.tld" New topic
Author

About taglib.tld

Shiang Wang
Ranch Hand

Joined: Jun 20, 2003
Posts: 96
In SCWCD Exam Study Kit (SCE310-080), it states on pg.286

.
.
when deployed in a JAR file, a TLD file be placed either directly under or inside a subdirectory of the META-INF directory. In addition, the name of the TLD file must be taglib.tld.
.
.


In JSP 2.0 specification, it states

JSP.7.2.1 Packaged Tag Libraries
.
.
Packaged tag libraries must have at least one tag library descriptor file. The JSP 1.1 specification allowed only a single TLD, in META-INF/taglib.tld, but as of JSP 1.2 multiple tag libraries are allowed. See Section JSP.7.3.1 for how TLDs are identified.
.
.


When I specify
<taglib>
<taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri>
<taglib-location>lib/appserv-jstl.jar</taglib-location>
</taglib>
in web.xml, I am getting error about not being able to find taglib.tld.
When I comment <taglib> element out, the application works fine. I check appserv-jstl.jar, there is no taglib.tld anywhere under META-INF, all they have are c.tld, fmt.tld,.. etc.

1. So why does the book (which is meant for JSP 1.2), it has to be taglib.tld while the JSP spec says that is only for JSP 1.1 ?

2. From my experience, it seems that when you define explicit mapping in deployment descriptor, the jsp container is looking for taglib.tld, when in implicit mapping (without <taglib> defined in web.xml), the jsp container reads all .tld under META-INF folder in the packaged jar files.
Is my assumption right?

I am using Jboss 3.2.6 with Tomcat 5.0

Thanks,
Shiang


SCBCD, SCWCD, SCJP
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: About taglib.tld