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
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "About taglib.tld" Watch "About taglib.tld" New topic

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
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


I agree. Here's the link:
subject: About taglib.tld
jQuery in Action, 3rd edition