struts-config.xml 文件:
struts-config.xml配置文件是一个在Web客户端组件的视图和模型之间的联系,但你的项目的99.99就不会碰这些设置%。基本的配置文件包含以下主要内容:
| SN | Interceptor & 描述 |
|---|---|
| 1 | struts-config This is the root node of the configuration file. |
| 2 | form-beans This is where you map your ActionForm subclass to a name. You use this name as an alias for your ActionForm throughout the rest of the struts-config.xml file, and even on your JSP pages. |
| 3 | global forwards This section maps a page on your webapp to a name. You can use this name to refer to the actual page. This avoids hardcoding URLs on your web pages. |
| 4 | action-mappings This is where you declare form handlers and they are also known as action mappings. |
| 5 | controller This section configures Struts internals and rarely used in practical situations. |
| 6 | plug-in This section tells Struts where to find your properties files, which contain prompts and error messages |
下面是示例struts-config.xml文件:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd"> <struts-config> <!-- ========== Form Bean Definitions ============ -->
<form-beans>
<form-bean name="login" type="test.struts.LoginForm" />
</form-beans> <!-- ========== Global Forward Definitions ========= -->
<global-forwards>
</global-forwards> <!-- ========== Action Mapping Definitions ======== -->
<action-mappings>
<action
path="/login"
type="test.struts.LoginAction" > <forward name="valid" path="/jsp/MainMenu.jsp" />
<forward name="invalid" path="/jsp/LoginView.jsp" />
</action>
</action-mappings> <!-- ========== Controller Definitions ======== -->
<controller
contentType="text/html;charset=UTF-8"
debug="3"
maxFileSize="1.618M"
locale="true"
nocache="true"/> </struts-config>
struts-config.xml文件的更多详细信息,请检查你的Struts文档。
struts-config.xml 文件:的更多相关文章
- MyBatis2:config.xml文件
前言 前一篇文章,讲了MyBatis入门,讲到了MyBatis有两个基本的配置文件,一个用来配置环境信息,一个用来写SQL语句.前者我把它命名为config.xml,config.xml的内容是: & ...
- MyBatis(2):config.xml文件
前言 前一篇文章,讲了MyBatis入门,讲到了MyBatis有两个基本的配置文件,一个用来配置环境信息,一个用来写SQL语句.前者我把它命名为config.xml,config.xml的内容是: 1 ...
- Android项目中的config.xml文件 “config.xml”
Android应用程序需要保存一些配置时,可以将这些配置项放置到values/config.xml文件中. 实例分析: <?xml version="1.0" encodin ...
- ssh框架中.xml文件小技巧分离xml
struts.xml文件 struts.xml文件里的action可以分离出来,如: <!-- 预警信息监测 --> <include file="config/strut ...
- 无废话Android之android下junit测试框架配置、保存文件到手机内存、android下文件访问的权限、保存文件到SD卡、获取SD卡大小、使用SharedPreferences进行数据存储、使用Pull解析器操作XML文件、android下操作sqlite数据库和事务(2)
1.android下junit测试框架配置 单元测试需要在手机中进行安装测试 (1).在清单文件中manifest节点下配置如下节点 <instrumentation android:name= ...
- 初学DOM树解析xml文件
做了一次设计模式实验的题目: 某软件公司为新开发的智能手机控制与管理软件提供了一键备份功能,通过该功能可以将原本存储在手机中的通信录.短信.照片.歌曲等资料一次性全部拷贝到移动存储介质(例如MMC卡或 ...
- 转载 Silverlight实用窍门系列:1.Silverlight读取外部XML加载配置---(使用WebClient读取XAP包同目录下的XML文件))
转载:程兴亮文章,地址;http://www.cnblogs.com/chengxingliang/archive/2011/02/07/1949579.html 使用WebClient读取XAP包同 ...
- Java+XSL合并多个XML文件
使用 Java 解析 XML 文件有许多成熟的工具,如 dom4j 等等.但在一些场景中,我们可能使用 Ant.Maven 等构建工具对多个 XML 文件进行合并,我们希望可以直接通过脚本文件,或者简 ...
- Struts 关联DTD 文件
Struts 的xml 文件在Eclipse 中 默认是不会有提示的. 但是我们可以关联DTD 文件, 这样子就可以出现如下的struts 提示了 1. 首先得先确保自己有Struts2 的Sr ...
- jenkins 实现多用户同时触发任务 + 修改job的config.xml 不重启服务生效
(后期添加: 这篇博客是在刚研究并发构建时写的,所以方法比较老套,采用的时流水线(pipeline)的方式,实现时通过如果job的用户配置来创建多个新的执行任务的job,并且将执行日志回收到入口job ...
随机推荐
- linux使用其它用户 su - op -c
su - op -c "whoami"
- Delphi 7下最小化到系统托盘
在Delphi 7下要制作系统托盘,只能制作一个比较简单的系统托盘,因为ShellAPI文件定义的TNotifyIconData结构体是比较早的版本.定义如下: 123456789 _NOTIFY ...
- C#之Raw Socket网络封包监视源码
大家可以建立一个Windows Form应用程序,在下面的各个文件中添加对应的源码: //RawSocket.csnamespace ReceiveAll{ using System; using S ...
- 你是那种仅仅看《XXXXX从入门到精通》的程序猿吗?
我一開始又要废话一番了. 实际上上了大学以后.你常常会在网上,在和别人的交流里,在老师的课堂上.反复听到一些书,比方黄仁宇的<万历十五年>.王小波"时代三部曲".村上春 ...
- js bind 绑定this指向
1.示例代码 <!DOCTYPE html> <html lang="zh"> <head> <meta charset="UT ...
- matlab中syms与sym有什么差别
syms x y %就是定了符号变量x y以后x y就能够直接使用了,有他们运算出来的结果也是符号变量 当然上面的也能够x=sym('x'),y=sym('y') sys('a+b')%就是将a+b转 ...
- MySQL 5.6数据导入报 GTID 相关错误
从阿里云备份数据后还原到本地,用命令行 mysql -uroot -p --default-character-set=<character> -f <dbname> < ...
- sql 写法注意点
a.CRUD(create,read,update,delete)操作方法写法格式 字段格式要个数据库表字段一致,字母不区分大小写,支持下划线. 例如: screenName or scrEenNam ...
- ibatis中<![CDATA[使用解释
http://hi.baidu.com/taoxincheng0/blog/item/3916c4ec413f03c22e2e2160.html ibatis中什么时候需要用到: <![CDAT ...
- spring boot和thrift、zookeeper建立微服务
原文地址:http://www.cnblogs.com/skyblog/p/5535418.html Spring cloud适应于云端服务,也适用于企业信息化SOA建设.spring boot也是r ...