File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Still TLD confusion" Watch "Still TLD confusion" New topic
Author

Still TLD confusion

Rick Rangers
Ranch Hand

Joined: Feb 06, 2007
Posts: 47
Hi,

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

Regards,
Rick


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

Joined: Nov 24, 2005
Posts: 14687
    
  16

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

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
 
Similar Threads
Regarding TLD Location
must name be taglib.tld in jarred taglibs + bug
About taglib.tld
TagLib Error
Confirmation About tag files inside jar