DOC

struts-config

By Suzanne Austin,2014-10-09 10:24
13 views 0
struts-config

    struts-config.xmlÅäÖÃʵÀý <?xml version="1.0" encoding="UTF-8"?>

    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts

    Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">

    <struts-config>

    <!--========== Form Bean Definitions ===================================-->

    <form-beans>

     <form-bean name="loginForm" type="form.LoginForm"/>

     <form-bean name="dynaLoginForm" type="form.DynaLoginForm">

     <form-property name="username" type="java.lang.String"/>

     <form-property name="password" type="java.lang.String"/>

     </form-bean>

     <form-bean name="dvLoginForm" type="org.apache.struts.validator.DynaValidatorForm">

     <form-property name="username" type="java.lang.String"/>

     <form-property name="password" type="java.lang.String"/>

     </form-bean>

    </form-beans>

    <!--========== Global Forward Definitions

    ==============================-->

    <global-forwards>

     <forward name="globalError" path="/globalerror.jsp"/>

     <forward name="index" path="/index.jsp"/>

    </global-forwards>

    <!--========== Action Mapping Definitions

    ==============================-->

    <action-mappings>

     <action path="/loginAction" type="action.LoginAction"

     name="loginForm" scope="request"

     validate="true" input="/login.jsp"/>

     <action path="/dynaLoginAction" type="action.LoginAction"

     name="dynaLoginForm" scope="request"

     validate="true" input="/login.jsp"/>

     <action path="/dvLoginAction" type="action.LoginAction"

     name="dvLoginForm" scope="request"

     validate="true" input="/login.jsp">

     <forward name="suc" path="/success.jsp"/>

     </action>

</action-mappings>

    <!--===========Message Resources Definitions=============================-->

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

    <message-resources parameter="properties.DefaultValue"

    key="properties.DefaultValue"/>

    <message-resources parameter="properties.Environment"

    key="properties.Environment"/>

<!-- ==========Validator

    defination======================================--> <plug-in className="org.apache.struts.validator.ValidatorPlugIn"> <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>

    <set-property property="stopOnFirstError" value="true"/>

    </plug-in>

    </struts-config>

Report this document

For any questions or suggestions please email
cust-service@docsford.com