struts error: HTTP Status 404 - Servlet action is not available

G

Geoff Winsor

Hi,
I am new to struts. I was hoping that someone could help me with an
error I get when trying to call an action (/searchAnnotation.do) from my
browser. When I make the call, this is the error I get:

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

I am using Apache Tomcat 5.5.4, Suse 9.0, Jakarta Struts 1.2.4

Here is the directory structure for my application:

/opt/tomcat/webapps/pseudomonas/WEB-INF/
classes/search/

SearchAnnotationAction.class
SearchAnnotationForm.class


lib/
catalina-root.jar
commons-beanutils.jar
commons-collections.jar
commons-digester.jar
commons-fileupload.jar
commons-logging.jar
commons-validator.jar
jakarta-oro.jar
jstl.jar
standard.jar
struts.jar

The pertinent information from my web.xml file directly under WEB-INF:


<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>
<load-on-startup>1</load-on-startup>
</servlet>

<!-- Standard Action Servlet Mapping -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>

My struts-config.xml file in the same directory as web.xml:

<form-beans>
<form-bean
name="SearchAnnotationForm"
type="search.SearchAnnotationForm">
</form-bean>
</form-beans>

<action-mappings>
<action path="/searchAnnotation"
type="search.SearchAnnotationAction"
name="SearchAnnotationForm"
scope="request"
validate="false"
input="/search.jsp" />
<forward name="success" path="/searchResults.jsp"/>
</action>
</action-mappings>

Finally, a few points to note:
- I removed the validator and tiles plugins to rule out any chance
problems is caused by them.

- struts-examples and struts-blank applications work fine
- jsp pages in the pseudomonas application work fine
- no other info in logs/Catalina file other than "INFO: Servlet action
is currently unavailable"
Could any other unforseen problems associated with the ActionForm or
ActionClass classes I use contribute to this problem??
I appreciate any help you can provide.
Cheers,
Geoff
 
R

Ryan Stewart

Geoff Winsor said:
Hi,
I am new to struts. I was hoping that someone could help me with an error I
get when trying to call an action (/searchAnnotation.do) from my browser. When
I make the call, this is the error I get:

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
[...]
Finally, a few points to note:
- I removed the validator and tiles plugins to rule out any chance problems is
caused by them.

- struts-examples and struts-blank applications work fine
- jsp pages in the pseudomonas application work fine
- no other info in logs/Catalina file other than "INFO: Servlet action is
currently unavailable"
Could any other unforseen problems associated with the ActionForm or
ActionClass classes I use contribute to this problem??
I appreciate any help you can provide.
You should double check the logs. There should be a line in one of the Tomcat
logs or in your own logs, if you have logging configured, saying something like
"Marking servlet action as unavailable". It's probably right before or after a
long stacktrace. This problem is usually caused by a corrupted config file or
missing files.
 
A

Andrea Desole

I'm not sure, but maybe the context plays a role. Did you try something
like /pseudomonas/searchAnnotation.do?
 
G

Geoff Winsor

Andrea said:
I'm not sure, but maybe the context plays a role. Did you try something
like /pseudomonas/searchAnnotation.do?

Hi Andrea,
That is a good idea, Yes, that did come to mind and I tried it with no
luck getting it to work.
Thanks,
Geoff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top