Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

struts taglib issue

 
Mansi Mishra
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to create a simple struts application.
I have defined the struts tiles library in my web.xml




These tlds are present in my WEB-INF folder. Also I have included the struts.jar in my project classpath.
the index.jsp only carries two lines.



Yet on running the application I get the following error.

Parsing of JSP File '/index.jsp' failed:
--------------------------------------------------------------------------------
/index.jsp(1): Could not parse deployment descriptor: java.io.IOException: cannot resolve '/WEB-INF/struts-logic.tld' into a valid tag library
probably occurred due to an error in /index.jsp line 1:
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

Please advice.
 
Mansi Mishra
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, I have added the jstl and standard.jar files under WEB-INF/lib directory
 
Mansi Mishra
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seems like adding the taglib.tld to my web.xml did the trick.

<taglib-uri>/tlds/taglib</taglib-uri>
<taglib-location>/WEB-INF/tlds/taglib.tld</taglib-location>
</taglib>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic