2007年7月31日星期二

2007年7月25日星期三

Struts2的struts.properties配置文件详解

struts.action.extension
The URL extension to use to determine if the request is meant for a Struts action 用URL扩展名来确定是否这个请求是被用作Struts action,其实也就是设置 action的后缀,例如login.do的'do'字。

struts.configuration
The org.apache.struts2.config.Configuration implementation class
org.apache.struts2.config.Configuration接口名
struts.configuration.files

A list of configuration files automatically loaded by Struts struts
自动加载的一个配置文件列表

struts.configuration.xml.reload
Whether to reload the XML configuration or not
是否加载xml配置(true,false)

struts.continuations.package
The package containing actions that use Rife continuations
含有actions的完整连续的package名称

struts.custom.i18n.resources
Location of additional localization properties files to load
加载附加的国际化属性文件(不包含.properties后缀)

struts.custom.properties
Location of additional configuration properties files to load
加载附加的配置文件的位置

struts.devMode
Whether Struts is in development mode or not
是否为struts开发模式

struts.dispatcher.parametersWorkaround
Whether to use a Servlet request parameter workaround necessary for some versions of WebLogic
(某些版本的weblogic专用)是否使用一个servlet请求参数工作区(PARAMETERSWORKAROUND)

struts.enable.DynamicMethodInvocation
Allows one to disable dynamic method invocation from the URL
允许动态方法调用

struts.freemarker.manager.classname
The org.apache.struts2.views.freemarker.FreemarkerManager implementation class
org.apache.struts2.views.freemarker.FreemarkerManager接口名

struts.i18n.encoding
The encoding to use for localization messages
国际化信息内码

struts.i18n.reload
Whether the localization messages should automatically be reloaded
是否国际化信息自动加载

struts.locale
The default locale for the Struts application
默认的国际化地区信息

struts.mapper.class
The org.apache.struts2.dispatcher.mapper.ActionMapper implementationclass
org.apache.struts2.dispatcher.mapper.ActionMapper接口

struts.multipart.maxSize
The maximize size of a multipart request (file upload)multipart
请求信息的最大尺寸(文件上传用)

struts.multipart.parser
The org.apache.struts2.dispatcher.multipart.MultiPartRequest parser implementation for a multipart request (file upload)
专为multipart请求信息使用的org.apache.struts2.dispatcher.multipart.MultiPartRequest解析器接口(文件上传用)

struts.multipart.saveDir
The directory to use for storing uploaded files
设置存储上传文件的目录夹

struts.objectFactory
The com.opensymphony.xwork2.ObjectFactory implementation classcom.opensymphony.xwork2.ObjectFactory接口(spring)

struts.objectFactory.spring.autoWire
Whether Spring should autoWire or not
是否自动绑定Spring

struts.objectFactory.spring.useClassCache
Whether Spring should use its class cache or not
是否spring应该使用自身的cache

struts.objectTypeDeterminer
The com.opensymphony.xwork2.util.ObjectTypeDeterminer implementationclass
com.opensymphony.xwork2.util.ObjectTypeDeterminer接口

struts.serve.static.browserCache
If static content served by the Struts filter should set browser caching header properties or not 是否struts过滤器中提供的静态内容应该被浏览器缓存在头部属性中

struts.serve.static
Whether the Struts filter should serve static content or not
是否struts过滤器应该提供静态内容

struts.tag.altSyntax
Whether to use the alterative syntax for the tags or not
是否可以用替代的语法替代tags

struts.ui.templateDir
The directory containing UI templatesUI templates的目录夹

struts.ui.theme
The default UI template theme默认的UI template主题

struts.url.http.port
The HTTP port used by Struts URLs设置http端口

struts.url.https.port
The HTTPS port used by Struts URLs
设置https端口

struts.url.includeParams
The default includeParams method to generate Struts URLs
在url中产生 默认的includeParams

struts.velocity.configfile
The Velocity configuration file pathvelocity
配置文件路径

struts.velocity.contexts
List of Velocity context namesvelocity的context列表

struts.velocity.manager.classname
org.apache.struts2.views.velocity.VelocityManager implementationclass
org.apache.struts2.views.velocity.VelocityManager接口名

struts.velocity.toolboxlocation
The location of the Velocity toolboxvelocity工具盒的位置

struts.xslt.nocache
Whether or not XSLT templates should not be cached
是否XSLT模版应该被缓存

[code]
struts.i18n.reload=true
struts.devMode = true
struts.configuration.xml.reload=true
struts.continuations.package=org.apache.struts2.showcase
struts.custom.i18n.resources=globalMessages
#struts.action.extension=jspa
struts.url.http.port = 8080
struts.freemarker.manager.classname=customFreemarkerManager
struts.serve.static=true
struts.serve.static.browserCache=false
struts.codebehind.defaultPackage=person
[/code]

摘:Struts2.0+spring2.0+hibernate3.1升级体会

首先升级spring2.0,因为spring2.0是向下兼容的,所以也只是将spring1.2.8的包换成了spring2.0.3的包。虽然spring2.0是向下兼容,但他需要的其他包也跟着需要变换。例如如果你程序包括acegi的话,就需要将以前的echache1.1或者1.2换成spring2.0.3中带着的echache1.2.4。不然就会在启动tomcat的时候报错,说找不到echache这个类。

Struts2.0跟struts1.x完全不同,首先需要把struts1.x的东西都删除掉。
1、 lib包中的struts1.x,以及他那几个commons包都可以删除,不过要看你其他的程序是否调用了这些commons包。
2、 formbean可以删除了,因为你后台有个pojo类。
3、 validation框架可以除去了
4、 资源包也可以删除了
5、 Action和页面先留着,主要是看你的业务逻辑。如果业务逻辑简单也可以删除了。

接着添加struts2.0需要的包
freemarker-2.3.8.jar,ognl-2.6.11.jar,struts2-core-2.0.6.jar,xwork-2.0.1.jar,struts2-spring-plugin-2.0.6.jar 。需要注意的是struts2-core-2.0.6.jar和struts2-all-2.0.6.jar不能同时添加到lib包中。

因为struts2.0对于1.x来说是全新的技术,不可能都面面具到的提及,只能说说自己的体会。

spring2.0与1.x区别不大,可以平滑的过度,我也就是把spring1.28换成了spring2.0.3,算是升级到spring 2.0了。
struts2.0基本就是webwork2.2,与以前的struts1.x可以说没任何关系了。
因为是第一次用struts2.0,也是第一次用webwork,所以有很多不完善,不规范的地方,还望大家来拍砖。下次在将这次使用struts2.0的心得写篇文章。因为是对前一次写的struts+spring+hibernate的改进,所以一些新的朋友还不知道数据库以及架构是什么样子的。建议可以先看看这里:struts+spring+hibernate的web应用<一> 架构搭建 lib包需要以下这些包

周四早上有感

今儿周四,我就知道过完这一周开始,接下来的一个月肯定是艰苦奋斗的一个月~~,好在我的生日还没有倒霉到下个月~想想真可怕,后天就是自己25生日,可是还不知道自己应该怎么过去那一天~想出去玩,又想省钱,但又不知道和呵谁~早两年这话决不会从我嘴里出来~
把逻辑倒回去~~~今儿周四~早上的公交车^*&^*狂faint~我可是比以往早期那么多~6:55起的床~~哎,总是想安安心心的吃一顿早餐,可好今天连吃的时间都没有了,现在8:50,不爽
跳跃性的思维~疯狂关注freemaker+struts2.0+hibernate+spring架构方面的东西~兴趣所致说的自己伟大了点~工作需要...VSS的版本控制,用的好烦~为什么每次登录的时候要在终端先象征性的talnet一下~搞不明白两个登陆到底有什么区别想想着周还有两天~看来需要疯狂收集关于上面提供的架构方面的技术信息~
网络上找吧!!!!!!!!

2007年7月21日星期六

7.21------周六

有意思的周末~一不小心当上了叔叔,大哥也终于当上了爸爸。真的好快~想想自己的人生挺悲哀的,大姐大哥的婚礼都没有参加~每次回去就会发现多了一个小外甥.......看看自己.......

现在的英文培训好像是一个吞钱的机器~太可怕了~华尔街如是,英孚亦如是~~

看到的未来暗淡无光~现在的生活又是光鲜背后的无奈......选择......如果不甘心就要不断地选择......又是一种赌博......怕输不起~~

又抱着希望:Hope does not disappoist me 看看怎么选 怎么赌~!

2007年7月15日星期日

Our father in heaven——About Romans 5

Therefore, since we are justified by faith, we have peace with God through our Lord Jesus Christ, through whom we have obtained access to this grace in witch we stand; and we boast in our hope of sharing the glory of God.
And not only that, but we also boast in our sufferings, knowing that suffering produces endurance, and endurance produces character, and character products hope, and hope not disappoint us, because God's love has been poured into our hearts through the Holy Spirit that has been given to us.
这是关于罗马书上的一段:因信称义的福。中文的翻译如下:
我们既因信称义,就借着我们的主耶稣基督得与神相和。我们又借着他,因信得进入现在所站的这恩典中,并且欢欢喜喜盼望神的荣耀。不但如此,就是在患难中也是欢欢喜喜的。因为知道患难生忍耐,忍耐生老练,老练生盼望,盼望不至于羞耻;因为所赐给我们的圣灵将神的爱浇灌在我们心里。

今天去做了礼拜,传道的人讲了一些圣经里的事情,有一些感触...但是对于中文上的一些译句,我感觉有些生硬,所以用自己的理解,把这一段给翻译以下:

因此,一旦我们坚定我们的信仰,通过我们的主基督耶稣得与神相和,又借由他获得了我们通往所站的这恩典中。我们已盼望着分享主的荣耀而感到自豪。不仅仅是这些,我们也已我们受到的苦难而自豪。心照不宣的来说,每一个教徒都应知道:苦难产生忍耐,忍耐磨练人做事的意志,而意志催发出希望,有了希望就不会使我们沮丧。因为所给与我们的圣灵将神的爱源源不断的输入到我们的心中。

2007年7月14日星期六

I like this picture


surfing online and find this picture,It is very funny(interesting),like me~~
Posted by Picasa