This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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
Author

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:

WebRoot
->WEB-INF
->->struts-html.tld
->->struts-logic.tld
->->tags
->->->struts-html.tld
->->->struts-logic.tld

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.


Merrill
Consultant, Sima Solutions
Vikrant Korde
Greenhorn

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
/WEB-INF/struts-html.tld
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 http://struts.apache.org/tags-html then it takes the tld from the JAR file directly. and in previous case it takes from web-inf directory.
 
GeeCON Prague 2014
 
subject: Why: File "/WEB-INF/struts-html.tld" not found.