Eclipse+JBoss+Struts制作网上书店解析(二)

原创 2004年08月25日 11:10:00

struts-config.xml

<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE struts-config PUBLIC
          "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
          "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">

<!--
     This is the Struts configuration file for the example application,
     using the proposed new syntax.
-->


<struts-config>


  <!-- ========== Data Source Configuration =============================== -->
<!--
 <data-sources>
  
 </data-sources>
-->
  <!-- ========== Form Bean Definitions =================================== -->
  <form-beans>
 <form-bean name="LoginForm"
  type="vincent.actions.LoginForm" />
  
 <form-bean name="ProductForm"
  type="vincent.actions.ProductForm" />
 
 <form-bean name="PageForm"
  type="vincent.actions.PageForm" />
  
  </form-beans>


  <!-- ========== Global Forward Definitions ============================== -->
  <global-forwards>
    <!-- Logon.jsp is the place to enter the name and password -->
    <forward   name="Logon"           path="/pages/Logon.jsp"/>
   
    <forward   name="ProductList"     path="/pages/ProductList.jsp"/> 
    <forward   name="ProductAdd"      path="/pages/ProductAdd.jsp" />
    <forward   name="ProductDelete"   path="/pages/ProductDelete.jsp" />
    <forward   name="ProductDetail"   path="/pages/ProductDetail.jsp" />
    <forward   name="ProductEdit"     path="/pages/ProductEdit.jsp" />
    <forward   name="ProductDiscount" path="/pages/ProductDiscount.jsp" />
   
    <forward   name="View"      path="/View.do"  />
  </global-forwards>


  <!-- ========== Action Mapping Definitions ============================== -->
  <action-mappings>
   
    <action
     path="/TT"
     type="vincent.actions.TTAction"
     name="LoginForm"
     input="/pages/index.jsp" >
    </action>
 
   <action
    path="/Login"
    type="vincent.actions.LoginAction"
    name="LoginForm"
    scope="request"
    input="/pages/Logon.jsp">
   </action>
   
   <action
    path="/View"
    type="vincent.actions.ViewAction"
    scope="request"
        name="ProductForm"
    input="/pages/Logon.jsp">
   </action>
    
   
   <action
    path="/ProductList"
    type="vincent.actions.ProductListAction"
    name="ProductForm"
    scope="request"
    input="/pages/ProductList.jsp">
   </action>
    
   <action
    path="/Add"
    type="vincent.actions.AddAction"
    name="ProductForm"
    scope="request"           
    input="/pages/ProductAdd.jsp" >
   </action>
   
   <action
    path="/Edit"
    type="vincent.actions.EditAction"
    name="ProductForm"
    scope="request"
    input="/pages/ProductEdit.jsp" >
   </action>
   
   <action
    path="/Delete"
    type="vincent.actions.DeleteAction"
    name="ProductForm"
    scope="request"
    input="/pages/ProductDelete.jsp" >
   </action>
   
   
   
  </action-mappings>


  <!-- ========== Controller Configuration ================================ -->

  <controller>
    <!-- The "input" parameter on "action" elements is the name of a
         local or global "forward" rather than a module-relative path -->
    <set-property property="inputForward" value="true"/>
  </controller>


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

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


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

收藏助手
不良信息举报
您举报文章:Eclipse+JBoss+Struts制作网上书店解析(二)
举报原因:
原因补充:

(最多只允许输入30个字)