aspose file tools
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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply Bookmark "TLD file location in webapps" Watch "TLD file location in webapps" New topic
Author

TLD file location in webapps

Varun Selvanathan
Greenhorn

Joined: Jun 17, 2012
Posts: 10

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

Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14672
    
  11

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 Selvanathan
Greenhorn

Joined: Jun 17, 2012
Posts: 10

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
Rancher

Joined: Apr 07, 2010
Posts: 1041

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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: TLD file location in webapps
 
Similar Threads
Gimme a hand pahdner!!!
Regarding TLD Location
HFSJ page 485/562
cant call servlet from a jsp
question about tld