wood burning stoves 2.0*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes location of tld files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "location of tld files" Watch "location of tld files" New topic
Author

location of tld files

Lucas Smith
Ranch Hand

Joined: Apr 20, 2009
Posts: 804
    
    1

There is written in HFSJ that tld files must be placed:
1). inside /WEB-INF dir or its subdirectories
2). inside /META-INF or its subdirectories if we have JAR file

But I know that there can be a map in web.xml.
We can put <taglib> inside <jsp-config> and connect TLDs with URIs.
Can we put tlds in another directory and create that map explicitly?


SCJP6, SCWCD5, OCE:EJBD6.
BLOG: http://leakfromjavaheap.blogspot.com
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9293
    
  17

I just tried it and yes it can be done. If you place your tld file outside the WEB-INF folder and map it in the web.xml, then it works...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Abhay Agarwal
Ranch Hand

Joined: Feb 29, 2008
Posts: 1086
    
    1

Hi Ankit

Please post a sample code

Thanks


Oracle Java Web Service Developer (1z0-897), Oracle certified Java 7 Programmer, SCJA 1.0, SCJP 5.0, SCWCD 5.0, Oracle SQL Fundamentals I
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9293
    
  17

I placed mytags.tld in a folder named "whatever" in the web applications root and included this in the web.xml
Lucas Smith
Ranch Hand

Joined: Apr 20, 2009
Posts: 804
    
    1

OK, thank you.
So not only /WEB-INF rocks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: location of tld files