Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > struts error: HTTP Status 404 - Servlet action is not available

Reply
Thread Tools

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

 
 
Geoff Winsor
Guest
Posts: n/a
 
      01-12-2005
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
 
Reply With Quote
 
 
 
 
Ryan Stewart
Guest
Posts: n/a
 
      01-12-2005
"Geoff Winsor" <(E-Mail Removed)> wrote in message
news:cs2hi6$o2$(E-Mail Removed)...
> 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.


 
Reply With Quote
 
 
 
 
Andrea Desole
Guest
Posts: n/a
 
      01-12-2005
I'm not sure, but maybe the context plays a role. Did you try something
like /pseudomonas/searchAnnotation.do?


Geoff Winsor wrote:
> 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

 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      01-12-2005
On Wed, 12 Jan 2005 13:49:34 +0100, Andrea Desole wrote:

> Did you try something like..


Andrea, could you possibly try something like trimming[1] most of the
92 lines from the former posts over which you place your reply?

[1] <http://www.physci.org/codes/javafaq.jsp#netiquette>

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
 
Reply With Quote
 
Andrea Desole
Guest
Posts: n/a
 
      01-12-2005
Andrew Thompson wrote:
> Andrea, could you possibly try something like trimming[1] most of the
> 92 lines from the former posts over which you place your reply?
>
> [1] <http://www.physci.org/codes/javafaq.jsp#netiquette>
>


Sorry, I just thought it would be fair to include the entire message,
since I was not replying to any part in particular. I didn't think it
could be annoying. I'll think about it next time.
 
Reply With Quote
 
Geoff Winsor
Guest
Posts: n/a
 
      01-12-2005
Andrea Desole wrote:
> 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
 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      01-13-2005
On Wed, 12 Jan 2005 14:08:08 +0100, Andrea Desole wrote:

(trimming)
> ..I'll think about it next time.


Thanks.

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Struts - Servlet action is not available tim@nocomment.com Java 0 08-30-2006 12:53 PM
HTTP Status 503 - Servlet action is currently unavailable... help me? Pasha Java 2 05-12-2006 06:39 AM
Why getInputStream in a http servlet request isn't getting the datasent by browser HTTP POST action? James Java 3 11-25-2005 11:17 PM
struts plug-in for struts-menu causing action not to preload dawnsk1@yahoo.com Java 0 02-14-2005 02:59 PM
Struts Static Action Form vs Dyanamic Action Form Joe Bloggs Java 1 08-03-2003 02:30 AM



Advertisments