our struts config file

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd">

<struts-config>
<form-beans>
</form-beans>

<global-exceptions>
<!--
<exception key="number" path="/jsp/system.jsp" type="java.lang.NumberFormatException" />
<exception key="pointer" path="/jsp/system.jsp" type="java.lang.NullPointerException" />
<exception key="memory" path="/jsp/system.jsp" type="java.lang.OutOfMemoryError" />
<exception key="runtime" path="/jsp/system.jsp" type="java.lang.RuntimeException" />
<exception key="servlet" path="/jsp/system.jsp" type="javax.servlet.ServletException" />
<exception key="jsp" path="/jsp/system.jsp" type="javax.servlet.jsp.JspException" />
   -->
   <!-- 捕获未处理的例外,也包括常见的Http错误和Servlet错误 tsing -->
   <exception key="uncatchable" type="java.lang.Throwable" handler="org.apache.struts.action.ExceptionHandler" path="/error.jsp" scope="request" />
</global-exceptions>
<global-forwards>
<forward name="failure" path="/jsp/errorMsg.jsp" />
</global-forwards>

<action-mappings>
<action path="/index" forward="/main.jsp"/>
</action-mappings>
<controller nocache="false" inputForward="true" maxFileSize="50M"/>
<message-resources parameter="ApplicationResources_zh_CN"></message-resources>
<plug-in
className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property property="contextConfigLocation" value="/WEB-INF/classes/applicationContext*.xml" />
</plug-in>
      <!-- ========== Validator plugin =================== 
   
    <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
        <set-property property="pathnames"  value="/WEB-INF/validator-rules.xml,/WEB-INF/validator-rules-custom.xml,/WEB-INF/validation.xml"/>
    </plug-in>
    -->
</struts-config>


=============================

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd">

<struts-config>
  <form-beans>
<form-bean name="accountForm" type="com.sino.mis.account.web.form.AccountForm" />
<form-bean name="accountContactsForm" type="com.sino.mis.account.web.form.AccountContactsForm" />
<form-bean name="industyForm" type="com.sino.mis.account.web.form.IndustyForm" />
<form-bean name="industryCsForm" type="com.sino.mis.account.web.form.IndustryCsForm" />
  </form-beans>


  <global-exceptions/>
  <global-forwards>
  </global-forwards>

  <action-mappings >
  <action path="/accountInfo" name="accountForm"
parameter="actionType" scope="request"
type="org.springframework.web.struts.DelegatingActionProxy">
<forward name="list" path="/jsp/account/accountList.jsp"/>
<forward name="toadd" path="/jsp/account/accountNew.jsp"/>
<forward name="add" path="/accountInfo.do?actionType=search"/>
<forward name="tomodify" path="/jsp/account/accountEdit.jsp"/>
<forward name="toShow" path="/jsp/account/accountShow.jsp"/>
<forward name="modify" path="/accountInfo.do?actionType=search" />
<forward name="delete" path="/accountInfo.do?actionType=search" />
<forward name="search" path="/accountInfo.do?actionType=list"/>
<forward name="error" path="/jsp/account/message.jsp"/>
<forward name="select" path="/jsp/account/accountSelect.jsp"/>
<forward name="detail" path="/jsp/account/leslie_shenzhou/accountRead.jsp"/>

<forward name="reAdd" path="/jsp/account/reAddmsg.jsp"/>
</action>
<action path="/accountContacts" name="accountContactsForm"
parameter="actionType" scope="request"
type="org.springframework.web.struts.DelegatingActionProxy">
<forward name="list" path="/jsp/account/accountContactsList.jsp"/>
<forward name="toadd" path="/jsp/account/accountContactsNew.jsp"/>
<forward name="add" path="/accountInfo.do?actionType=search"/>
<forward name="tomodify" path="/jsp/account/accountContactsEdit.jsp"/>
<forward name="modify" path="/accountContacts.do?actionType=search"/>
<forward name="delete" path="/accountContacts.do?actionType=search"/>
<forward name="search" path="/accountContacts.do?actionType=list"/>
<forward name="actsdetail" path="/jsp/account/leslie_shenzhou/accountRead.jsp"/>

</action>

<action path="/industyInfo" name="industyForm"
parameter="actionType" scope="request"
type="org.springframework.web.struts.DelegatingActionProxy">
<forward name="list" path="/jsp/account/industyList.jsp"/>
<forward name="toadd" path="/jsp/account/industyAdd.jsp"/>
<forward name="toedit" path="/jsp/account/industyEdit.jsp"/>
<forward name="search" path="/industyInfo.do?actionType=search"/>
</action>

<action path="/industryCsInfo" name="industryCsForm"
parameter="actionType" scope="request"
type="org.springframework.web.struts.DelegatingActionProxy">
<forward name="list" path="/jsp/account/industryCsList.jsp"/>
<forward name="toadd" path="/jsp/account/industryCsAdd.jsp"/>
<forward name="toedit" path="/jsp/account/industryCsEdit.jsp"/>
<forward name="search" path="/industryCsInfo.do?actionType=search"/>
</action>

  </action-mappings>

</struts-config>

你可能感兴趣的:(struts)