Http status 404 servlet action not available

actionhttp-status-code-404servletsstruts

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?

Best Answer

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.

Related Topic