• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

File "/WEB-INF/struts-logic.tld" not found

 
rick collette
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, guys:

I got the following exception when I try to runa simple jsp page:
org.apache.jasper.JasperException: File "/WEB-INF/struts-logic.tld" not found
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:105)
............


the following is my jsp page:

<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<logic:redirect page="/do/goToInitialPage"/>

taglibs specified in web.xml:

......
<taglib>
<taglib-uri>struts/bean</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>

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

<taglib>
<taglib-uri>struts/logic</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
.........
struts-logic.tld is in WEN-INF folder

I double-checked everything many times, still cannot find out what is the
cause of this exception. I also unpacked war file in tomcat/webapps dir, and found struts-logic.tld is packed inside.

Anther thing is war file is never unpacked automatically when tomcat starts running. Is it because of the above exception?

regards,
 
Dee Gee
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am now facing the same problem.
If you got the soln for this can you please share it with me.

Thank You
DG
 
Pallavi ch
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
URI is a logical name given to tag-lib location. In JSP , URI is used but not the tag-lib location.

In ur JSP, ur trying to access URI - "/WEB-INF/struts-logic.tld", which is not defined in web.xml.
In web.xml URI defined as struts/logic.

Try changing web.xml
<taglib>
<taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>

or modify ur JSP

<%@ taglib uri="struts/logic" prefix="logic" %>

Either of them would do.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic