struts2和webwork2的比较
来源:互联网 发布:百胜软件上海分公司 编辑:程序博客网 时间:2024/04/28 13:56
表1 Struts 2和WebWork成员名称的对应
www.86oo.com
www.86oo.com
Struts 2成员 http://www.86oo.com
WebWork成员
86oo.com
com.opensymphony.xwork2.* 86oo.com
com.opensymphony.xwork.*
org.apache.Struts2.*
86oo.com
com.opensymphony.webwork.*
86oo.com欢迎你
struts.xml
xwork.xml
struts.properties 欢迎各位访问86oo.com
webwork.properties
86oo.com
Dispatcher
DispatcherUtil
org.apache.Struts2.config.Settings
86oo.com提供各类教程
com.opensymphony.webwork.config.Configuration
除此之外,Struts 2也删除了WebWork中少量特性: 86oo.com
(1)AroundInterceptor:Struts 2不再支持WebWork中的AroundInterceptor。如果应用程序中需要使用AroundInterceptor,则应该自己手动导入WebWork中的AroundInterceptor类。
(2)富文本编辑器标签:Struts 2不再支持WebWork的富文本编辑器,如果应用中需要使用富文本编辑器,则应该使用Dojo的富文本编辑器。
欢迎各位访问86oo.com
(3)IoC容器支持:Struts 2不再支持内建的IoC容器,而改为全面支持Spring的IoC容器,以Spring的IoC容器作为默认的Object工厂。
struts2对webwork的改进之处:
1.webwork.properties文件中变量现在可以配置在下列文件(这是struts2自带文档中的说的):
struts-default.xml
struts-plugin.xml(在每个plugin的jar包中)
struts.xml(用constant元素)
struts.properties(没有默认文件,可选,与webwork.properties文件相似,每个项目可以有这个文件)
web.xml
下面是struts2自带文档中的示例
Constant Example (struts.xml)
<struts>
<constant name="struts.devMode" value="true" />
...
</struts>Constant Example (struts.properties)
struts.devMode = trueConstant Example (web.xml)
<web-app id="WebApp_9" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<filter>
<filter-name>struts</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
<init-param>
<param-name>struts.devMode</param-name>
<param-value>true</param-value>
</init-param>
</filter>
...
</web-app>
2.加入了通配符的支持,这是在ww2中没有的,如下:
<action name="*" >
<result>/tutorial/{1}.jsp</result>
</action>
- struts2和webwork2的比较
- 关于Struts和Webwork2的比较-转贴
- 关于Struts和Webwork2的比较
- WebWork2和Spring MVC Framework的比较
- 从webwork2.2应用到struts2的移植看webwork2.x和struts2的区别
- struts与webwork2的比较
- struts与webwork2的比较
- webwork2.2到struts2的变化[摘录]
- Struts1.1与webwork2的比较
- Webwork2.1.7和Webwork2.2.4得到Request的区别
- Spring接管webwork2/Struts2
- WebWork2与Struts比较
- WebWork2与Struts比较
- WebWork2与Struts比较
- struts1和struts2的比较
- struts1和struts2的比较
- struts1和struts2的比较
- struts1和struts2的比较
- 一个小型的溢出实验
- 再说ActionMessages类及其用法
- 解决TOMCAT 安装过程中到jvm.dll时就停住不动的问题
- UDP的IOCP方式
- jdk 1.5 与jdk 1.6 在annotation中的一点区别
- struts2和webwork2的比较
- 深入探讨struts的ActionMessages消息机制
- 《Microsoft SQL Server 2005技术内幕:T-SQL查询》 勘误表
- VMware虚拟机的网络设置 - Ice_Dragon的记事本子(From美丽的冰城哈尔滨) - CSDNBlog
- EiD_Patch_Maker_0_5_0 汉化补丁 by CxLrb
- 切勿带刀参加枪战
- 抽象类--〉〉〉〉为什么要有抽象类,他存在的意义是什么?? 各位指点..
- 安装myEclipse
- 关于SSH架构的设想