tags:

views:

207

answers:

1

On our application we are getting an error saying:

PWC6117: File "/struts-tags" not found

code in the file thats giving error is:

<%@ taglib prefix="s" uri="/struts-tags" %>

This file is in struts2-core.jar which is placed on the classpath of the app server (Sun 9.1).

The code will work fine and not complain when the jar is actually in WEB-INF/lib of the application, compared to being on classpath of the appserver. But we can not change that. it has to be on appservers classpath.

But how should we change our code so that this error goes away?

I can create mapping in my web.xml so that tag uri's are change. but what should taglib-location be changed to? so that it references to app servers classpath?

<taglib>
<taglib-uri>/WEB-INF/struts-tags.tld</taglib-uri> 
<taglib-location>/WEB-INF/struts-tags.tld</taglib-location> 
</taglib>
A: 

It could be that the app server, and the web application itself are running two different classloaders. So make sure that the jar file is available not just in the app server's classpath, but in the classpath of the application itself. If there is a "shared" lib directory (thats where it would be in WebSphere... not sure about Sun) put it there

Spike Williams
yes, its in the shared lib. thats why the Java code does not complain even though it is importing struts2 classes. Only JSP tags are complaining.
Omnipresent