| Author |
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" timestamp="true"/> </Context> ---- 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" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <servlet> <servlet-name>action</servlet-name> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> <init-param> <param-name>config</param-name> <param-value>/WEB-INF/struts-config.xml</param-value> </init-param> <init-param> <param-name>validate</param-name> <param-value>true</param-value> </init-param> <init-param> <param-name>debug</param-name> <param-value>2</param-value> </init-param> <init-param> <param-name>detail</param-name> <param-value>2</param-value> </init-param> <load-on-startup>0</load-on-startup> </servlet> <!-- Action Servlet Mapping --> <servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <!-- The Welcome File List --> <welcome-file-list> <welcome-file>/index.html</welcome-file> </welcome-file-list> <!-- tag libs --> <!-- <taglib> <taglib-uri>/struts-bean-el-taglib</taglib-uri> <taglib-location>/WEB-INF/tld/struts-bean-el.tld</taglib-location> </taglib> <taglib> <taglib-uri>/html-el-taglib</taglib-uri> <taglib-location>/WEB-INF/tld/struts-html-el.tld</taglib-location> </taglib> <taglib> <taglib-uri>/logic-el-taglib</taglib-uri> <taglib-location>/WEB-INF/tld/struts-logic-el.tld</taglib-location> </taglib> <taglib> <taglib-uri>/c-taglib</taglib-uri> <taglib-location>/WEB-INF/tld/c.tld</taglib-location> </taglib> <taglib> <taglib-uri>/struts-template-taglib</taglib-uri> <taglib-location>/WEB-INF/tld/struts-template.tld</taglib-location> </taglib> <taglib> <taglib-uri>/struts-tiles-taglib</taglib-uri> <taglib-location>/WEB-INF/tld/struts-tiles.tld</taglib-location> </taglib> --> </web-app> ---- 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" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd"> <!-- ======================================================================= This is the Struts configuration file for the PROJECT application. ======================================================================= --> <struts-config> <!-- ========== Form Bean Definitions ================================== --> <!-- <form-beans> <form-bean name="" type=""/> </form-beans> --> <!-- ========== Global Forward Definitions ============================= --> <global-forwards> <forward name="index" path="/index.do" /> </global-forwards> <!-- ========== Action Mapping Definitions ============================= --> <action-mappings> <action path="/index" forward="web/jsp/menu.jsp" /> </action> </action-mappings> <!-- ========== 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" /> </plug-in> --> </struts-config> ---- 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, bryan
|
"...and the Truth will set you free."
|
 |
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11945
|
|
|
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 (Manning Publications, 2007) [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: commons-beanutils.jar commons-collections.jar commons-digester.jar commons-fileupload.jar commons-lang.jar commons-logging.jar commons-validator.jar PROJECT.jar jakarta-oro.jar jstl.jar standard.jar struts.jar struts-el.jar
|
 |
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> OR <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... bryan
|
 |
Ionut Nedelcu
Greenhorn
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 java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158) at java.net.Socket.connect(Socket.java:426) at java.net.Socket.connect(Socket.java:376) .... 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(ActionServlet.java:739) at org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.java:713) at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:670) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:329) at javax.servlet.GenericServlet.init(GenericServlet.java:256) 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
|
 |
 |
|
|
subject: Struts 1.1 / Tomcat 5.0.16 - "Servlet Action is not available"
|
|
|