STRUTS2.XML详解
来源:互联网 发布:英文软件看不懂怎么办 编辑:程序博客网 时间:2024/06/05 12:10
- <!DOCTYPE struts PUBLIC "-//ApacheSoftware Foundation//DTD Struts Configuration 2.0//EN""http://struts.apache.org/dtds/struts-2.0.dtd" >
- <struts>
-
-
-
-
-
-
<!-- package提供了将多个Action组织为一个模块的方式 -
package的名字必须是唯一的 package可以扩展 当一个package扩展自 -
另一个package时该package会在本身配置的基础上加入扩展的package -
的配置 父package必须在子package前配置 -
name:package名称 -
extends:继承的父package名称 -
abstract:设置package的属性为抽象的 抽象的package不能定义action 值true:false -
namespace:定义package命名空间该命名空间影响到url的地址,例如此命名空间为/test那么访问是的地址为http://localhost:8080/struts2/test/XX.action -
-- -
-
-
<!-- 定义拦截器 -
name:拦截器名称 -
class:拦截器类路径 -
-- -
-
-
-
-
-
-
-
-
-
<!-- 定义默认的拦截器 每个Action都会自动引用 -
如果Action中引用了其它的拦截器 默认的拦截器将无效 -- -
-
-
-
-
-
-
-
-
<!-- Action配置 一个Action可以被多次映射(只要action配置中的name不同) -
name:action名称 -
class: 对应的类的路径 -
method: 调用Action中的方法名 -
-- -
-
<!-- 引用拦截器 -
name:拦截器名称或拦截器栈名称 -
-- -
-
-
<!-- 节点配置 -
name : result名称 和Action中返回的值相同 -
type : result类型 不写则选用superpackage的typestruts-default.xml中的默认为dispatcher -
-- -
-
<!-- 参数设置 -
name:对应Action中的get/set方法 -
-- -
-
-
- </struts>
0 0
- Struts2 XML配置详解
- STRUTS2.XML详解
- struts2.xml文件详解
- Struts2 XML配置详解 .
- Struts2 XML配置详解
- Struts2 XML配置详解
- Struts2 XML配置详解
- Struts2 XML配置详解
- Struts2 XML配置详解 .
- struts2.xml详解
- Struts2 XML配置详解
- Struts2 XML配置详解
- Struts2 XML配置详解
- Struts2 XML配置详解
- Struts2 XML配置详解
- struts2.xml详解
- struts2 struts.xml详解
- Struts2 XML详解
- Linux部署TOMCAT错误出现java.net.…
- log4j详解
- 比较有用的log4j.properties
- 在职人员攻读硕士学位的六种…
- 『在职研究生 』 在职人员读硕士研…
- STRUTS2.XML详解
- No configuration found for the s…
- cc2540 cc2541 低功耗实测和总结-与注意事项 - 低功耗小于10uA
- 文本框中只能输入11位的数字
- struts标签中如何取request中map存…
- 【转】Spket在Eclipse/MyEclipse下…
- jQuery+Ajax+Struts2.0 [转]
- Oracle的同义词
- oracle 同义词