配置struts2, ring2,hibernane3方法

文章作者 100test 发表时间 2007:10:10 11:38:19
来源 100Test.Com百考试题网


一、配置Struts2
跟webwork配置基本一致,主要是struts2.properties和struts.xml 2个配置文件,我的struts2.properties如下配置:
struts2.properties

struts.tag.altSyntax = true
struts.devMode = true

### These can be used to set the default HTTP and HTTPS ports
struts.url.http.port = 80
#webwork.url.https.port = 443

### This can be used to set your locale and encoding scheme
struts.custom.i18n.resources=ApplicationResources
struts.locale=zh_CN
struts.i18n.encoding=utf-8

# uses javax.servlet.context.tempdir by default
struts.multipart.parser=com.opensymphony.webwork.dispatcher.multipart.PellMultiPartRequest
#struts.multipart.saveDir=tmp
struts.multipart.saveDir=/tmp
struts.multipart.maxSize=512000000
struts.configuration.xml.reload=true

struts.objectFactory = spring
struts.xml 就是配置action了,由于设定了struts.objectFactory = spring,因此struts2会自动将action转为spring的bean,struts.xml可以直接配置我们的action路径,在action中我们只需要设置某个service文件的set方法即可调用事务管理bean。
struts.xml



相关文章


获取ChoiceGroup多选状态下的值
利用线程池技术实现端口扫描(TCP)
Taglib的打包部署和使用方式详解
将控制台重定向到GUI组件上
配置struts2, ring2,hibernane3方法
为UML模型添加颜色的实现方法
Struts2中实现IoC模式
运用DBUnit进行高效的单元测试
基于JavaMail包的邮件发送程序
澳大利亚华人论坛
考好网
日本华人论坛
华人移民留学论坛
英国华人论坛