What is wrong with this struts-config.xml?

1.6k views Asked by At

Getting the following error : java.lang.NullPointerException: Module 'null' not found.

 <?xml version="1.0" encoding="UTF-8" ?>


    <struts-config>

        <form-beans>
            <form-bean name="RegistrationForm" type="com.testapp.actionform.RegistrationForm" />
        </form-beans>

        <global-exceptions>
        </global-exceptions>

        <global-forwards>
        </global-forwards>

        <action-mappings>

            <action path="/Registration" type="com.testapp.action.RegistrationAction" name="RegistrationForm"   scope="request" validate="false" input="index.jsp" >
                <forward name="success" path="/pages/RegistrationSuccess.jsp" />
            </action>

        </action-mappings>

        <message-resources parameter="resources.Application" />

    </struts-config>
3

There are 3 answers

0
Paul On BEST ANSWER

Do you have the servlet mapping setup in the web.xml

    <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>

1

see the section on "configuring your application for modules" in the docs

3
adarshr On

Nothing seems to be wrong. Is your message resource present under WEB-INF/classes/resources/Application.properties?

0
Lokesh Sah On

Got the error.

Just a typo in web.xml file.

<servlet-class>org.**apche**.struts.action.ActionServlet</servlet-class>

Thanks anyways guys.