首页 > 其他 > 详细

struts.xml

时间:2016-05-31 16:06:22      阅读:152      评论:0      收藏:0      [点我收藏+]

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

<struts>

<constant name="struts.configuration.xml.reload" value="true" />
<constant name="struts.devMode" value="true" />

<!-- name 给我们的package取个名字 namespace访问路径 extends继承了那个package -->
<package name="default" namespace="/" extends="struts-default">

<!-- action 访问的连接地址去访问class类 根据method找到对应的方法名,此方法不能有传参 -->
<action name="login_*" class="usersAction" method="{1}">
<!-- 根据找到对应的方法的返回值,匹配对面的result的name值 -->
<result name="success" type="redirect">/admin/index.jsp</result>
<result name="error">/error.jsp</result>
</action>


</package>
</struts>

struts.xml

原文:http://www.cnblogs.com/fangshao/p/5545952.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!