• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

"WEB-INF/lib/struts-html.tld" not Found

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have created a Struts web application. It consists of login page,action class,form bean & success jsp page. when i click on the submit button in login page, the control has to go to action class & so on. Based on the logic , i have created code.

I am getting the following exception when the login.jsp page is loaded,

org.apache.JasperException: File "/WEB-INF/lib/struts-html.tld" not Found

1. Login.jsp


<%@ taglib uri="/WEB-INF/lib/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/lib/struts-logic.tld" prefix="logic"%>
<html:form name="Login" action="LoginAction">
Name : <html:text property="name"></html:text><br>
Password : <html:text property="password"></html:text><br>
<html:submit>Submit</html:submit>
</html:form>


I am sure that all tld files(struts-html.tld,struts-logic.tld etc) are in /WEB-INF/lib/ and am using Tomcat5.0.2


Even though i keep all tld files in required directory, i am getting "tld not found" error.

Even i tried another option like this

<taglib>
<taglib-uri>/WEB-INF/lib/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/lib/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/lib/struts-logic.tld</taglib-uri>
<taglib-location>/WEB-INF/lib/struts-logic.tld</taglib-location>
</taglib>


Does anybody say why it is giving an error?

Is there any tomcat version problem?


Thanks
Arulraj
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you're using Struts 1.3 or above, you should be using the namespace instead of the physical location of the tld file. Example:

If you are using an earlier version of Struts, don't put the tld files in WEB-INF/lib. That's reserverd for jar files. Put them in the root of WEB-INF or in another subdirectory (e.g. WEB-INF/taglibs) instead.
 
reply
    Bookmark Topic Watch Topic
  • New Topic