File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Location of a tld file 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 "Location of a tld file" Watch "Location of a tld file" New topic

Location of a tld file

Yogesh Hingmire
Ranch Hand

Joined: Dec 06, 2005
Posts: 61
Hello Friends,

1) HFSJ says that the tld file has to be somewhere under the WEB-INF , However the SCWCD Study kit by Hanumant Deshmukh says it can also be present under any directory in the web-app.

I havent tried this yet, but could you guys confirm on this.

2) Also the SCWCD Study kit says, when deployed as a jar file, the name of the taglib MUST be taglib.tld. I think this is also not true. say for eg the struts.jar contains tld's but they are not named as taglib.tld.

Please let me know on the same.

Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

All wrong

1)When deployed inside a JAR file, the tag library descriptor files must be in the META-INF directory, or a subdirectory of it. When deployed directly into a web application, the tag library descriptor files must always be in the WEB-INF directory, or some subdirectory of it. TLD files should not be placed in /WEB-INF/classes or /WEB-INF/lib.

2)You can give it any name you want. Tag library descriptor files have names that use the extension .tld, and the extension indicates a tag library descriptor file.

[My Blog]
All roads lead to JavaRanch
Yogesh Hingmire
Ranch Hand

Joined: Dec 06, 2005
Posts: 61
One more thing then to watch out for people who are using SCWCD Study Kit

I agree. Here's the link:
subject: Location of a tld file
It's not a secret anymore!