Two Laptop Bag
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
JavaRanch » Java Forums » Java » JSP
Bookmark "TLD location?" Watch "TLD location?" New topic

TLD location?

ankur rathi
Ranch Hand

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

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

Joined: Aug 15, 2004
Posts: 2874
I usually go like
deng shuangyi

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

Joined: Jul 06, 2005
Posts: 1580
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

Joined: Jan 10, 2002
Posts: 63838

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

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: TLD location?
It's not a secret anymore!