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

Discussion in 'Java' started by Geoff Winsor, Jan 12, 2005.

  1. Geoff Winsor

    Geoff Winsor Guest

    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
    Geoff Winsor, Jan 12, 2005
    #1
    1. Advertising

  2. Geoff Winsor

    Ryan Stewart Guest

    "Geoff Winsor" <> wrote in message
    news:cs2hi6$o2$...
    > 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.
    Ryan Stewart, Jan 12, 2005
    #2
    1. Advertising

  3. 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
    Andrea Desole, Jan 12, 2005
    #3
  4. Andrew Thompson, Jan 12, 2005
    #4
  5. 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.
    Andrea Desole, Jan 12, 2005
    #5
  6. Geoff Winsor

    Geoff Winsor Guest

    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
    Geoff Winsor, Jan 12, 2005
    #6
  7. Andrew Thompson, Jan 13, 2005
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steven Hines
    Replies:
    2
    Views:
    1,104
    Steven Hines
    Feb 5, 2004
  2. Replies:
    0
    Views:
    1,229
  3. James
    Replies:
    3
    Views:
    16,249
    Roedy Green
    Nov 25, 2005
  4. Pasha
    Replies:
    2
    Views:
    13,485
  5. Replies:
    0
    Views:
    4,967
Loading...

Share This Page