0
votes

I get the following error on submitting a jsp file:

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.

My application looks like:

+WebAppl
       +src
            +com.ss.user.actions.authentication
                 +IndexAction.java
      +jsp
            +index.jsp
            +login.jsp
      +web-inf
            +struts-config.xml
            +web-xml
            +etc some other files

In the index.jsp file I have a form, looking like:

<form method="post" action="<%=request.getContextPath()%> /authentication/Index.do">
<input type="submit" value="PressMe"/>  
</form>

In struts-confif I've defined the following action:

<action path="/authentication/Index" scope="request" type="com.ss.user.actions.authentication.IndexAction">
            <forward name="success" path="/jsp/login.jsp" />
</action> 

IndexAction.java

public ActionForward execute(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response)
            throws Exception {
        return mapping.findForward(SUCCESS);}

I know that error 404 means file not found and probably there is a mistake in the path given, but I can't figure it out. Can anyone help me?

1
Is that space in the form action attribute really there? Any reason you're not just using the Struts form tag? - Dave Newton
the space is not there, I've checked .. and I just found a little mistake and changed "action="<%=request.getContextPath()%>/authentication/Index.do"> " to "action="<%=request.getContextPath()%>/authentication/index.do">" and it's not working at all .. Sincerely, I never used before the Struts form tag .. don't know how it looks like - Steffi
but do you think it will make any difference if I would change only the form tag? - Steffi
Don't know, I'm asking why you're not using it because it (a) knows about Struts actions, and (b) knows about the app context. - Dave Newton

1 Answers

0
votes

Please check your .xml files , if there is some syntax error then also you will be seeing this error.
Checking for missing tags / incomplete tags.