0

收到以下错误:java.lang.NullPointerException:找不到模块“null”。

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

3 回答 3

1

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

于 2011-02-18T11:13:31.133 回答
0

Got the error.

Just a typo in web.xml file.

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

Thanks anyways guys.

于 2011-02-18T11:15:26.597 回答
0

似乎没有什么问题。您的消息资源是否存在于 WEB-INF/classes/resources/Application.properties 下?

于 2011-02-18T11:06:06.530 回答