Page 476 of Head First Servlet and JSP says that the four places where containier looks for TLDs are 1. Directly inside WEB-INF 2. Directly inside a sub-directory of WEB-INF 3. Inside the META-INF directory inside a JAR file that's inside WEB-INF/lib 4. Inside a sub-directory of META-INF inside a JAR file thats's inside WEB-INF/lib
Reading (2) above made me feel that the containder will look for the TLDs directly inside a sub-directory of WEB-INFs but will NOT traverser through layers of subdirectories to find it. For example I can have /myapp/WEB-INF/myFunctions.tld or /myapp/WEB-INF/tlds/myFunctions.tld but we can not have /myapp/WEB-INF/tlds/core/myFunctions.tld
Again, as (3) and (4) does not use the word "directly", it makes me "feel' that the container will be able to locate the TLDs from any place under the folder /myapp/WEB-INF/lib/jar/META-INF. Either directly under, or directly under a direct sub-directory or under any layer of sub-directory.
Now, when I come to page 485, the answer of Question 1 indicates that the TLD file may be placed in any subdirectory of WEB-INF. This contradicts (1) and (2).
Please advise if the answer at 485 is wrong of the use of word "Directly" at page 476 is wrong.
Maybe 'directly' is meant as opposed to inside a jar..
Since we're on the subject (hope I'm not stealing your thread) - a brief question: can a TLD be inside the classes and/or lib directory/ies?
SCJP 1.4 (81%)<br />SCWCD 5 (95%)
Joined: May 29, 2008
Problem is that if "directly" does not mean "directly" in (1) and (2) above than (1) and (2) together means you can put TLD any where under WEB-INF AND container will find it. When I say "any-where" , I mean anywhere.. even like /myapps/WEB-INF/dir1/dir2/dir3/myLost.tld and surprisingly (3) (4) will not required to be mentioned separately as they are also under WEB-INF.
Joined: Jun 06, 2008
3 and 4 refer to a jar-file.
jar != directory. So they have to be mentioned seperately. [ June 12, 2008: Message edited by: Jan Sterk ]
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Four places the Container looks for TLDs - Errata for HFSJ