struts中的一些常用配置
来源:互联网 发布:楼房平面图设计软件 编辑:程序博客网 时间:2024/06/11 13:35
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<!-- 添加struts2请求后缀常量 -->
<!-- <constant name="struts.action.extension" value="action,do"></constant> -->
<!-- 当struts的配置文件修改后,系统是否自动重新加载该文件,默认值为false -->
<constant name="struts.configuration.xml.reload" value="true"/>
<!-- 打开动态方法调用 -->
<constant name="struts.enable.DynamicMethodInvocation" value="true"/>
<package name="user" namespace="/" extends="struts-default">
<!-- 测试动态方法调用 -->
<action name="HelloAction" class="com.action.HelloAction">
<result name="success">/index.jsp</result>
<result name="success2">/index.jsp</result>
<result name="success3">/index.jsp</result>
</action>
<!-- 测试通配符配置-->
<action name="HelloAction_*" class="com.action.HelloAction" method="{1}">
<result name="success">/index.jsp</result>
<result name="success2">/index.jsp</result>
<result name="success3">/index.jsp</result>
</action>
</package>
</struts>
<?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>
<!-- 添加struts2请求后缀常量 -->
<constant name="struts.action.extension" value="action,do"></constant>
<!-- 当struts的配置文件修改后,系统是否自动重新加载该文件,默认值为false -->
<constant name="struts.configuration.xml.reload" value="true"/>
<!-- localhost:8080/struts2_20170906/test/HelloAction.action -->
<!-- name:必填,保证唯一,名称任意(通常使用模块名称) namespace:可选,如果有值,就需要在请求地址中添加 extends:必填,只有继承了struts-default,才能使用struts2的功能 -->
<package name="user" namespace="/" extends="struts-default">
<!-- name:必填,保证唯一,名称通常使用控制器类的名称 class:控制器的路径 method:控制器的方法 -->
<action name="HelloAction" class="com.action.HelloAction"
method="execute">
<!-- name:控制器中方法的返回字符串 -->
<result name="success">/index.jsp</result>
</action>
<action name="HelloAction2">
<result>/index.jsp</result>
</action>
<!---------------------------------------- dispatcher(默认值):转发到jsp chain:转发到action redirect:重定向到jsp redirectAction:重定向到action -->
<action name="HelloAction3" class="com.action.HelloAction"
method="execute">
<result name="success" type="dispatcher">/index.jsp</result>
</action>
<action name="HelloAction4" class="com.action.HelloAction"
method="execute">
<result name="success" type="chain">HelloAction</result>
</action>
<action name="HelloAction5" class="com.action.HelloAction"
method="execute">
</action>
<action name="HelloAction6" class="com.action.HelloAction"
method="execute">
<result name="success" type="redirectAction">
<param name="actionName">HelloAction</param>
</result>
</action>
</package>
</struts>
- struts中的一些常用配置
- struts中的常用配置
- struts 中的一些常用方法
- struts.xml中的<struts>元素下<constant>节点常用配置
- debian7.8中的一些常用配置
- VS工程配置中的一些常用概念
- sublime使用过程中的一些常用配置
- Struts-config 常用配置
- struts 2 常用配置
- struts.properties常用配置
- struts常用配置
- struts常用配置
- Struts.xml常用配置
- struts常用配置
- Struts.xml常用配置
- struts常用配置
- hibernate的核心配置中的一些常用配置
- Struts中的DataSource配置
- JAVA学习(1)
- eclipse快捷键大全
- influxdb初体验
- myeclipse启动的过程中没提示就自动退出,闪退的有效解决方法
- Java模板模式
- struts中的一些常用配置
- Scheme环境搭建
- 面试题10:Vasya
- 接腾讯语音SDK遇到的坑
- 斐讯免费路由的内幕与真相:留后门劫持流量窃取用户隐私
- [MySql] sql语句总结
- 新的方向
- 5种将死的编程语言
- Python常用标准库使用