File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Problem deploying Struts WAR Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Groovy Fundamentals video training course this week in the Groovy forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Problem deploying Struts WAR" Watch "Problem deploying Struts WAR" New topic

Problem deploying Struts WAR

Matthew Snow
Ranch Hand

Joined: May 02, 2007
Posts: 82
We have a Tomcat 4.1.31 running in a JVM 1.4.2_09 on our server (yes an upgrade is overdue). I've built a Jakarta Struts application and have previously deployed it successfully. However, I have since made some changes to the source code and when trying to deploy the WAR file back to Tomcat I get the following error:

javax.servlet.UnavailableException: Parsing error processing resource path /WEB-INF/struts-config.xml
at org.apache.struts.action.ActionServlet.initApplicationConfig(
at org.apache.struts.action.ActionServlet.init(
at javax.servlet.GenericServlet.init(

By trial and error, I've found that I can successfully deploy the WAR if I remove all my <action-mappings> declarations from the struts-config.xml which of course leaves me dead in the water.

I have a feeling this has to be a Tomcat issue and not a struts issue since I can delpoy it successfully on my own machine (using the same Tomcat version and JVM environment). I have also tried creating a bare bones struts app with a single action class, but I still get this error (unless I remove the <action-mappings> of course).

So far I've tried placing the struts.jar in the common/lib directory as well as the server/lib directory (which probably isn't necesary). I have also tried downloading the struts-config_1_1.dtd and referencing it directy from the struts-config.xml file rather than through http.

Here is the struts-config.xml file of the bare bones app (it's smaller):

<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"

<form-bean name="lookupForm" type="app.LookupForm" />

<action path="/Lookup" type="app.LookupAction" name="lookupForm">
<forward name="success" path="/success.jsp" />
<forward name="failure" path="/index.jsp" />

When you break the big rules, you get a lot of little rules.
I agree. Here's the link:
subject: Problem deploying Struts WAR