Servlet action is not available

http-status-code-404servletsstruts

a strange thing is happening when i call servlet using struts, if i call it from my local host it gets called but when i deploy it on my web server it throws an error saying "servlet action is not available"

here's my web.xml

   <servlet>
            <servlet-name>action</servlet-name>
            <display-name>socialauthdemo</display-name>
            <description>Application for socialauth demo</description>
            <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>
            <init-param>
                    <param-name>debug</param-name>
                    <param-value>2</param-value>
            </init-param>
            <init-param>
                    <param-name>detail</param-name>
                    <param-value>2</param-value>
            </init-param>
            <load-on-startup>2</load-on-startup>
    </servlet>

    <servlet-mapping>
            <servlet-name>action</servlet-name>
            <url-pattern>*.do</url-pattern>
    </servlet-mapping>

my struts-config.xml is as follows –

<action-mappings>

            <action path="/socialAuth" type="com.auth.actions.SocialAuthenticationAction" name="authForm" scope="session">
                    <forward name="failure" path="/jsp/error.jsp" />
            </action>

            <action path="/socialAuthSuccessAction" type="com.auth.actions.SocialAuthSuccessAction" name="authForm" scope="session">
                    <forward name="success" path="/jsp/authSuccess.jsp" />
                    <forward name="failure" path="/jsp/error.jsp" />
            </action>

    </action-mappings>

i have added the strus.jar file to y web-inf/lib folder

please let me know if there is something i am missing

Thanks

Best Answer

The servlet with the name action has failed to initialize. It has thrown an exception while the server is attempting to construct and initialize it. Read the server startup logs. The full exception and the stacktrace are in there. That part should in turn be self-explaining enough to fix the issue. If you can't decipher exceptions/stacktraces, feel free to update your question to include it.