File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Struts 1.1 / Tomcat 5.0.16 - Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 1.1 / Tomcat 5.0.16 - "Servlet Action is not available"" Watch "Struts 1.1 / Tomcat 5.0.16 - "Servlet Action is not available"" New topic

Struts 1.1 / Tomcat 5.0.16 - "Servlet Action is not available"

bryan nelson
Ranch Hand

Joined: Jun 16, 2003
Posts: 95
Hello there. I'm trying to create a new application using Struts 1.1 and Tomcat 5.0.16 (SDK 1.4.2_03). I have multiple applications already running on this version of Tomcat, only I keep getting the following error when I startup Tomcat.

HTTP Status 404 - Servlet action is not available
type Status report
message Servlet action is not available
description The requested resource (Servlet action is not available) is not available.

where the first part of the stack trace in the PROJECT_log file is:
2004-03-31 14:54:38 StandardContext[/PROJECT]Marking servlet action as unavailable
2004-03-31 14:54:39 StandardContext[/PROJECT]Servlet /PROJECT threw load() exception
javax.servlet.UnavailableException: Parsing error processing resource path
I've put the PROJECT.xml file in my "..\Tomcat 5.0.6\conf\Catalina\localhost folder which looks like this:
<Context docBase="../PROJECT"
path="/PROJECT" reloadable="true">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="localhost_PROJECT_log." suffix=".txt"
my web.xml file currently looks like this (i have the .tld def'ns commented out to try to isolate the problem):
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"



<!-- Action Servlet Mapping -->
<!-- The Welcome File List -->

<!-- tag libs -->



and my struts-config.xml looks like this (again, i've commented out my form beans, since i don't even have any yet...and the tiles plugin code in the hopes of isolating the problem).
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"

<!-- =======================================================================
This is the Struts configuration file for the PROJECT application.
======================================================================= -->

<!-- ========== Form Bean Definitions ================================== -->
<!-- <form-beans>
<form-bean name="" type=""/>
<!-- ========== Global Forward Definitions ============================= -->
<forward name="index" path="/" />
<!-- ========== Action Mapping Definitions ============================= -->
<action path="/index"
forward="web/jsp/menu.jsp" />

<!-- ========== Plug-In Settings ====================================== -->
<plug-in className="org.apache.struts.tiles.TilesPlugin" >
<set-property property="definitions-config" value="/WEB-INF/PROJECT-tiles.xml" />
<set-property property="definitions-debug" value="2" />
<set-property property="definitions-parser-details" value="2" />
<set-property property="definitions-parser-validate" value="true" />

I realize this is a lot of information, but no one else here at my company can figure this out. I would truly appreciate it if anyone would take a stab at this problem.
Thanks in advance,

"...and the Truth will set you free."
Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
Where have you put struts.jar? If it's not in WEB-INF/lib, try to remove it from where ever it is and add it into WEB-INF/lib. Just a guess--no guarantees...

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
bryan nelson
Ranch Hand

Joined: Jun 16, 2003
Posts: 95
it's already in there.
these are the jars i have in my WEB-INF/lib folder:
bryan nelson
Ranch Hand

Joined: Jun 16, 2003
Posts: 95
wow. i feel pretty rough after finding out the answer to this one:
In my struts-config.xml the actionMapping is in correct. I was closing the action tag twice.
It should be either
<action path="/index" forward="web/jsp/menu.jsp" >
<action path="/index" forward="web/jsp/menu.jsp"
Many thanks to both venur and valeriy who helped solve this problem!!
I hope this helps someone else as well...
Ionut Nedelcu

Joined: Sep 26, 2004
Posts: 2
I'm getting something similar.. When the application starts, the action servlet can't find struts-config.xml
The stack looks like this:

15:04:02,387 ERROR [ActionServlet] Parsing error processing resource path /WEB-INF/struts-config.xml Connection refused: connect
at Method)

15:04:02,397 INFO [Engine] StandardWrapper[:action]: Marking servlet action as unavailable
15:04:02,407 ERROR [Engine] StandardContext[]: Servlet threw load() exception
javax.servlet.UnavailableException: Parsing error processing resource path /WEB-INF/struts-config.xml
at org.apache.struts.action.ActionServlet.handleConfigException(
at org.apache.struts.action.ActionServlet.parseModuleConfigFile(
at org.apache.struts.action.ActionServlet.initModuleConfig(
at org.apache.struts.action.ActionServlet.init(
at javax.servlet.GenericServlet.init(

This happens on Tomcat 5.0.16 or JBoss 3.2.3 with Tomcat 4.1. The same application works just fine on Orion 2.x
I agree. Here's the link:
subject: Struts 1.1 / Tomcat 5.0.16 - "Servlet Action is not available"
It's not a secret anymore!