Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Struts, can't find *.tld in supplied jar files

I'm currently constructing some DC's to hold Struts on our nw2004s server. I've created one DC to hold all the main struts jars, and a few other DC's to hold the ancillary jar files used by Struts (and by other non web-based applications). References have been set between the libs, and mostly everything seems to work.

With the current version of Struts (1.3.8), the tld files are contained in the jar files, and they can be found in the META-INF/tld directory. Supposedly, I do NOT have to specify anything in web.xml to find these tld files, as long as I use the default uri's. For example, the default Tiles TLD uri is When I was initially testing Struts, I created a web app that contained all the Struts jar files, and the tld's were findable without specifying anything in the web.xml, as long as I used the default URI's.

If I place

<%@ taglib uri="" prefix="tiles" %>

in my JSP, I get a compilation error indicating that the tld file can't be found, so the tld resource can't be found...

I've tried creating a mapping in the web.xml mapping the URI to META-INF/td/struts-tiles.tld, but I get the same error. I can fetch the resource from the class loader using the above META-INF path, so the file is findable, yet Struts can't find it.

The only way I can make this work is to place the tld files in the WEB-INF directory of the web app, which is something I DO NOT want to do - the tld files are already in the jar files, so why should I have to duplicate them.

Has anyone else placed struts into a DC, and if so, were you able to reference the tld files in the jar files, or did you have to copy them into the WEB-INF directory?

My only thought on this is that this is a class loader issue, but if I can find the resource from the primary application, the child (Struts) should be able to find it.

I'm stumped. Help!

Former Member
Not what you were looking for? View more on this topic or Ask a question