码迷,mamicode.com
首页 > 其他好文 > 详细

例子代码:struts.xml配置文件

时间:2015-01-06 17:10:00      阅读:99      评论:0      收藏:0      [点我收藏+]

标签:

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

<struts>
    <constant name="struts.objectFactory" value="spring"/>
    
    <package name="default" extends="struts-default">
         <action name="list_book" class="bookAction">
             <result name="list">/list.jsp</result>
         </action>
         <action name="add_book" class="bookAction" method="add">
             <result name="listAction" type="redirectAction">list_book</result>
         </action>
         <action name="delete_book" class="bookAction" method="delete">
             <result name="listAction" type="redirectAction">list_book</result>
         </action>
         <action name="deleteAll_book" class="bookAction" method="deleteAll">
             <result name="listAction" type="redirectAction">list_book</result>
         </action>
         <action name="toUpdate_book" class="bookAction" method="toUpdate">
             <result name="edit">/edit.jsp</result>
         </action>
         <action name="update_book" class="bookAction" method="update">
             <result name="listAction" type="redirectAction">list_book</result>
         </action>        
    </package>

</struts>

 

例子代码:struts.xml配置文件

标签:

原文地址:http://www.cnblogs.com/aicpcode/p/4206158.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!