wood burning stoves 2.0*
The moose likes JSP and the fly likes TLD location? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "TLD location?" Watch "TLD location?" New topic
Author

TLD location?

ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
What is the right (recommended) location of TLD (.tld) files:



Thanks.
[ December 11, 2005: Message edited by: rathi ji ]
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
I usually go like
<application>/META-INF/tlds
deng shuangyi
Greenhorn

Joined: Aug 15, 2005
Posts: 6
usually *.tld 's position:
webapps -> application -> WEB-INF -> my.tld
Stefan Evans
Bartender

Joined: Jul 06, 2005
Posts: 1018
Quoting the JSP2.0 specification section 7.3.1

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.


IMO bundling tag libraries into a jar file is the best approach.
So put the tld in the META-INF directory of the jar.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61451
    
  67

This should have been asked in the JSP forum. Moved there.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: TLD location?