wood burning stoves
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Still TLD confusion 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 "Still TLD confusion" Watch "Still TLD confusion" New topic

Still TLD confusion

Rick Rangers
Ranch Hand

Joined: Feb 06, 2007
Posts: 47

I'm still having problems with the location and naming of .tld files.

My Deshmukh book tells me that if tld files are placed in a JAR file
it should be placed in a META-INF directory (or sub) and named taglib.tld.

In the specification I can't find this. When I read the specification I get the impression you can give the tld file any name you like when places in a JAR files as long as you place the tld file in the META-INF directory.

Is this assumtion correct?

Secondly: if you place a tld file in the WEB-INF or subdirectory, the container will automatically find it and if the tld file contains a <uri> element it will create a implicit mapping (given that the uri is unique)

Is my second assumtion correct?

I'm 13 hours away from my exam, so if someone could confirm my findings
of tell me otherwise it would be very appreciated!!


SCJP 5.0<br />SCWCD 1.4<br />IBM Certified Associate Developer -- Rational Application Developer for WebSphere Software V6.0<br />IBM Certified Solution Developer - IBM WebSphere Portal V6.0
Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

First question : you can give the TLD any name. A single TLD called "taglib.tld" was for the old specification 1.1.
Second question : yes, this is correct

I'm sorry to say that you have a very bad book. I've used the same one, and had to check the specs all the time.
Be really careful about tags and attributes, because they are not correct either. You've got to treat all tag related stuff really carefully.

[My Blog]
All roads lead to JavaRanch
Rick Rangers
Ranch Hand

Joined: Feb 06, 2007
Posts: 47

Thanks for the clarification!

Yup, I think it's a bad book too. While using it
I've come to the conclusion that much of the info
is not up-to-date.. Head First next time
I agree. Here's the link: http://aspose.com/file-tools
subject: Still TLD confusion
It's not a secret anymore!