This week's book giveaways are in the iOS and Features new in Java 8 forums.
We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line!
See this thread and this one for details.
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 Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 forum!

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: 1156
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: 62101

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:
subject: TLD location?