File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Why:  File Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Why:  File "/WEB-INF/struts-html.tld" not found." Watch "Why:  File "/WEB-INF/struts-html.tld" not found." New topic

Why: File "/WEB-INF/struts-html.tld" not found.

Robin Clark
Ranch Hand

Joined: Dec 17, 2003
Posts: 81
I am getting the above error in my index.jsp. My web.xml looks like this:

My index.jsp has the following:

My web app directory structure is as follows:


Note that I have struts-html.tld and struts-logic.tld under BOTH WEB-INF and WEB-INF/tags but they are still not being found.

When I start my application server and execute the application, I receive the following error:

If I use the following code in my index.jsp the application works fine:

Can someone explain to me why I am having troubles accessing the tld files locally?

Thank you.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
The latest versions of Struts (1.2.9 and above) in fact do not support a name attribute in the <html:form> tag. It has been deprecated. This means there's nothing wrong with your tag library declarations. You just need to remove the name and type attributes from your <html:form> tag.

Consultant, Sima Solutions
Vikrant Korde

Joined: Jun 16, 2008
Posts: 9
We were also facing the same problem.
The solution to this is to use correct version of the.tld file.

Compare the file
and the file present in struts.jar \META-INF\tlds\struts-html.tld

There must be some differences between these 2 files.

The reason it was working for 2nd code, is because when you put then it takes the tld from the JAR file directly. and in previous case it takes from web-inf directory.
I agree. Here's the link:
subject: Why: File "/WEB-INF/struts-html.tld" not found.
It's not a secret anymore!