This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Developer Career Masterplan: Build your path to senior level and beyond with practical insights from industry experts and have Heather VanCura and Bruno Souza on-line!
See this thread for details.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Liutauras Vilda
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Piet Souris

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

 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic