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

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>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值