struts-config.xml的配置

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

<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
<struts-config>
 <!--
  ========== Data Sources Definitions
  ===================================
 -->
 <!--
  Define your Struts data sources in a file called
  struts-data-sources.xml and place it in your merge directory.
  <data-sources> <data-source
  type="org.apache.commons.dbcp.BasicDataSource" key="odnsdb"
  id="typeone"> <set-property property="driverClassName"
  value="com.microsoft.sqlserver.jdbc.SQLServerDriver" /> <set-property
  property="url"
  value="jdbc:sqlserver://localhost:1433;databaseName=DB_FileMS" />
  <set-property property="username" value="sa" /> <set-property
  property="password" value="sa" /> </data-source> </data-sources>
 -->
 <!--
  ========== Form Bean Definitions ===================================
 -->
 <form-beans>
  <!--
   If you have non XDoclet forms, define them in a file called
   struts-forms.xml and place it in your merge directory.
  -->
 </form-beans>
 <!--
  ========== Global Exceptions Definitions
  ===================================
 -->
 <global-exceptions>
  <exception type="java.lang.Exception" key="errors.general"
   handler="cn.com.xunuo.webapp.action.ActionExceptionHandler" />
 </global-exceptions>
 <global-exceptions>
  <exception key="business" type="org.yeeku.exception.HrException"
   scope="request" path="/WEB-INF/jsp/error.jsp" />
  <exception key="general" type="java.lang.Exception" scope="request"
   path="/WEB-INF/jsp/error.jsp" />
 </global-exceptions>
 <!--
  ========== Global Forward Definitions
  ===================================
 -->
 <global-forwards>
        <!-- Default forward to "mainMenu" action -->
        <!-- Demonstrates using index.jsp to forward -->
  <forward name="errorPage" path="/error.jsp" redirect="true" />
  <forward name="sysErrorPage" path="/sys/error.jsp" redirect="true" />
        <!-- Forwards specified in actions -->
 </global-forwards>
 <!--
  ========== Action Mapping Definitions
  ===================================
 -->
 <action-mappings>
  <!--  简单转发-->
  <action path="/addEmp" forward="/WEB-INF/jsp/manager/addEmp.jsp" />
 </action-mappings>

 <!--<controller processorClass=""></controller>-->
 <controller inputForward="true" maxFileSize="5M" />
 <!--
  控制器 <controller contentType="text/html;charset=GBK"
  inputForward="true" nocache="true" bufferSize="5120"
  maxFileSize="10240"
  processorClass="org.springframework.web.struts.DelegatingRequestProcessor">
  </controller>
 -->
 <message-resources parameter="ApplicationResources" />

      <!-- ========== 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>
    <!-- ========== Menu plugin ======================== -->
    <!-- <plug-in className="net.sf.navigator.menu.MenuPlugIn"/> -->
 <!--
  启动容器时,要装载的配置文件,实现框架整合 <plug-in
  className="org.springframework.web.struts.ContextLoaderPlugIn">
  <set-property property="contextConfigLocation"
  value="/WEB-INF/action-servlet.xml,/WEB-INF/applicationContext.xml,/WEB-INF/daoContext.xml"
  /> </plug-in>
 -->
</struts-config>

你可能感兴趣的:(apache,xml,Web,jsp,struts)