struts1.2配置(2)-struts-config.xml
来源:互联网 发布:宁波院士之乡 知乎 编辑:程序博客网 时间:2024/06/05 15:25
结合Struts1配置文件总结: http://blog.csdn.net/xu252659774/article/details/12715561
一起看,感觉不错
<?xml version ="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd" >
<struts-config>
<data-sources />
<!-- 定义formBean类,并取一个别名name -->
<form-beans>
<form-bean name ="classMapForm" type="com.sinyee.qos.struts.form.ClassMapForm" />
</form-beans>
<global-exceptions>
<!-- key如果有handler的话就没用,但是必须添加-->
<exception key ="err.exception" type="com.sinyee.qos.base.BaseException"
handler="com.sinyee.qos.base.BaseExceptionHandler" />
<exception key ="err.exception" type="java.lang.Exception"
handler="com.sinyee.qos.base.BaseExceptionHandler" />
</global-exceptions>
<!-- 每一个全局的Forwards需要在<global-forwards>元素中定义一个<forward>子元素。全局 Forwards可以被所有的Action、异常处理以及一些Struts标签(如<html:link>)访问 -->
<global-forwards />
<!-- Action映射的主要功能是将Struts动作的访问路径(一般以.do结尾)和Struts动作类相对应。同时可以指定一个Formbean来接收和验证客户端提交的数据。 -->
<action-mappings>
<action attribute ="classMapForm" input="/test/classMap.jsp"
name="classMapForm" path="/classMap" scope="request"
type="org.springframework.web.struts.DelegatingActionProxy" >
<forward name ="FAIL" path="/test/classMap.jsp" />
<forward name ="SUCCESS" path="/test/success.jsp" />
</action>
<action path ="/showClassMapList" scope="request"
type="org.springframework.web.struts.DelegatingActionProxy" >
<forward name ="SUCCESS" path="/classmap/classMap_list.jsp" />
</action>
<action path ="/queryClassMap" scope="request" name="queryClassMapForm"
type="org.springframework.web.struts.DelegatingActionProxy" >
<forward name ="SUCCESS" path="/classmap/classACL_list.jsp" />
<forward name ="FALL" path="/classmap/classACL_list.jsp" />
</action>
</action-mappings>
<!-- 其中parameter属性表示保存信息资源的属性文件的位置,对于上面的代码来说,属性文件的位置是<Web根目录>"WEB-INF"classes"struts"application.properties。key属性表示application.properties文件的标识 -->
<message-resources parameter="com.sinyee.qos.struts.ApplicationResources" />
<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn" >
<set-property property ="contextConfigLocation"
value="/WEB-INF/classes/com/sinyee/qos/config/applicationContext.xml" />
</plug-in>
</struts-config>
- 【Struts1.2总结】struts-config.xml配置
- 【Struts1.2总结】struts-config.xml配置
- 【Struts1.2总结】struts-config.xml配置
- Struts1.2总结 struts-config.xml配置
- 【Struts1.2】struts-config.xml配置详解
- 【Struts1.2总结】struts-config.xml配置
- 【Struts1.2总结】struts-config.xml配置
- 【Struts1.2总结】struts-config.xml配置
- 【Struts1.2总结】struts-config.xml配置
- struts1.2 struts-config.xml配置
- struts1.2配置(2)-struts-config.xml
- struts1配置(xml,struts-config.xml)
- 【Struts1.2总结系列】struts-config.xml配置详解
- 【Struts1.2总结】struts-config.xml配置(转)
- struts1.2如何配置多个struts-config.xml
- IT忍者神龟之Struts1.2总结struts-config.xml配置
- 【STRUTS1.2】struts-config.xml详解
- struts1的数据库配置struts-config.xml
- hdu 1215 七夕节 数论的比较水题
- Android提交数据到服务器的两种方式四种方法
- 各种系统架构图及其简介(原创+收集)
- C# FileSystemWatcher
- struts1.2配置(1)-web.xml配置
- struts1.2配置(2)-struts-config.xml
- oracle常用操作语句【收集中】
- WordPress插件机制实现原理
- scrollTo 以及 scrollBy方法使用说明
- 【文件】CString类字符串序列化分析
- C++ Date Structure 3
- SQL Sever 2000/2005/2008下载地址集合
- 完美处理unicode码与其他字符串混合的字符串
- Ubuntu11.10设置桌面启动器(桌面快捷方式)