This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes TLD file location in webapps Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "TLD file location in webapps" Watch "TLD file location in webapps" New topic
Author

TLD file location in webapps

Varun Selva
Ranch Hand

Joined: Jun 17, 2012
Posts: 42

HFSJ mentioned that

it can be store

In the /META_INF directory of a Jar File Inside /WEB_INF/lib.
OR
IN/WEB_INF or a sub-directory!

So can we store inside the WEB_INF/classes directory or WEB_INF/lib ??
(those also sub directories of WEB_INF ):S


Varun Selva
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Hi. Lots of typos here.
TDL -> TLD
META_INF -> META-INF
WEB_INF -> WEB-INF

The JSP specification tells you exactly where to store the TLD files :

Tag library descriptor files have names that use the extension .tld, and the extension indicates a tag library descriptor file. 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.


[My Blog]
All roads lead to JavaRanch
Varun Selva
Ranch Hand

Joined: Jun 17, 2012
Posts: 42

Christophe Verré wrote:Hi. Lots of typos here.
TDL -> TLD
META_INF -> META-INF
WEB_INF -> WEB-INF

The JSP specification tells you exactly where to store the TLD files :

Tag library descriptor files have names that use the extension .tld, and the extension indicates a tag library descriptor file. 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.


yes you are correct!BUT
I just confused here!
But classes also lib also sub directories of the WEN_INF
IS it??
Frits Walraven
Creator of Enthuware JWS+ V6
Bartender

Joined: Apr 07, 2010
Posts: 1623
    
  23

But classes also lib also sub directories of the WEN_INF
IS it??

True, but should not doesn't mean is not allowed. If you put a TLD in one of those directories, it will still work...

Regards,
Frits
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: TLD file location in webapps
 
Similar Threads
HFSJ page 485/562
Gimme a hand pahdner!!!
Regarding TLD Location
cant call servlet from a jsp
question about tld