当前位置: 代码迷 >> Web前端 >> webwork.properties的属性配备(转载)
  详细解决方案

webwork.properties的属性配备(转载)

热度:524   发布时间:2012-10-06 17:34:01.0
webwork.properties的属性配置(转载)
webwork.properties的属性配置(转载)
2009-07-10 11:59

webwork.properties的属性配置(转载

### Webwork default properties###(can be overridden by a webwork.properties file in the root of the classpath)###### Specifies the Configuration used to configure webwork### one could extend com.opensymphony.webwork.config.Configuration### to build one&apos;s customize way of getting the configurations parameters into webwork# webwork.configuration=com.opensymphony.webwork.config.DefaultConfiguration### This can be used to set your default locale and encoding scheme# webwork.locale=en_USwebwork.i18n.encoding=UTF-8### if specified, the default object factory can be overridden here### Note: short-hand notation is supported in some cases, such as "spring"###?????? Alternatively, you can provide a com.opensymphony.xwork.ObjectFactory subclass name here # webwork.objectFactory = spring### specifies the autoWiring logic when using the SpringObjectFactory.### valid values are: name, type, auto, and constructor (name is the default)webwork.objectFactory.spring.autoWire=name### indicates to the webwork-spring integration if Class instances should be cached### this should, until a future Spring release makes it possible, be left as true### unless you know exactly what you are doing!### valid values are: true, false (true is the default)webwork.objectFactory.spring.useClassCache=true### if specified, the default object type determiner can be overridden here### Note: short-hand notation is supported in some cases, such as "tiger" or "notiger"###?????? Alternatively, you can provide a com.opensymphony.xwork.util.ObjectTypeDeterminer implementation name here### Note: if you have the xwork-tiger.jar within your classpath, GenericsObjectTypeDeterminer is used by default###?????? To disable tiger support use the "notiger" property value here.#webwork.objectTypeDeterminer=tiger#webwork.objectTypeDeterminer=notiger### Parser to handle HTTP POST requests, encoded using the MIME-type multipart/form-data# webwork.multipart.parser=cos# webwork.multipart.parser=pellwebwork.multipart.parser=jakarta# uses javax.servlet.context.tempdir by defaultwebwork.multipart.saveDir=webwork.multipart.maxSize=2097152### Load custom property files (does not override webwork.properties!)# webwork.custom.properties=application,com/webwork/extension/custom### How request URLs are mapped to and from actionswebwork.mapper.class=com.opensymphony.webwork.dispatcher.mapper.DefaultActionMapper### Used by the DefaultActionMapper### You may provide a comma separated list, e.g. webwork.action.extension=action,jnlp,dowebwork.action.extension=action### CompositeActionMapper# if we use a CompositeActionMapper, we could define the the ActionMappers# that will be consulted as follows. ActionMapper with lower order takes# precedence :-#webwork.mapper.class=com.opensymphony.webwork.dispatcher.mapper.CompositeActionMapper#webwork.compositeActionMapper.1=com.opensymphony.webwork.dispatcher.mapper.RestfulActionMapper#webwork.compositeActionMapper.2=com.opensymphony.webwork.dispatcher.mapper.DefaultActionMapper### Used by FilterDispatcher### If true than WW serves static content from inside its jar. ### If false than the static content must be available at <context_path>/webworkwebwork.serve.static=true### use alternative syntax that requires %{} in most places### to evaluate expressions for String attributes for tagswebwork.tag.altSyntax=true### when set to true, WebWork will act much more friendly for developers. This### includes:### - webwork.i18n.reload = true### - webwork.configuration.xml.reload = true### - raising various debug or ignorable problems to errors###?? For example: normally a request to foo.action?someUnknownField=true should###??????????????? be ignored (given that any value can come from the web and it###??????????????? should not be trusted). However, during development, it may be###??????????????? useful to know when these errors are happening and be told of###??????????????? them right away.webwork.devMode=false### when set to true, resource bundles will be reloaded on _every_ request.### this is good during development, but should never be used in productionwebwork.i18n.reload=false### Standard UI theme### Change this to reflect which path should be used for JSP control tag templates by defaultwebwork.ui.theme=xhtmlwebwork.ui.templateDir=template#sets the default template type. Either ftl, vm, or jspwebwork.ui.templateSuffix=ftl### Configuration reloading### This will cause the configuration to reload xwork.xml when it is changedwebwork.configuration.xml.reload=false### Location of velocity.properties file. defaults to velocity.properties# webwork.velocity.configfile=velocity.properties### Comma separated list of VelocityContext classnames to chain to the WebWorkVelocityContext# webwork.velocity.contexts=### used to build URLs, such as the UrlTagwebwork.url.http.port=80webwork.url.https.port=443### possible values are: none, get or allwebwork.url.includeParams=get### Load custom default resource bundles# webwork.custom.i18n.resources=testmessages,testmessages2### workaround for some app servers that don&apos;t handle HttpServletRequest.getParameterMap()### often used for WebLogic, Orion, and OC4Jwebwork.dispatcher.parametersWorkaround=false### configure the Freemarker Manager class to be used### Allows user to plug-in customised Freemarker Manager if necessary### MUST extends off com.opensymphony.webwork.views.freemarker.FreemarkerManager#webwork.freemarker.manager.classname=com.opensymphony.webwork.views.freemarker.FreemarkerManager### See the WebWorkBeanWrapper javadocs for more informationwebwork.freemarker.wrapper.altMap=true### configure the XSLTResult class to use stylesheet caching.### Set to true for developers and false for production.webwork.xslt.nocache=false### insert Freemarker&apos;s Sitemesh applydecorator transform to be put### into freemarker&apos;s model allowing sitemesh&apos;s applydecorator tag to ### be used in freemarker&apos;s page eg.### <@sitemesh.applydecorator name="someDecorator" page="/pages/somePage.ftl" />#webwork.freemarker.sitemesh.applyDecoratorTransform=true### A start up listener class name (must implements com.opensymphony.webwork.dispatcher.StartUpListener ### interface) that will get invoked only once when WebWork started up. The class names could be ### comma separated and will be executed in order.##webwork.dispatcher.startUpListener=foo.bar.StartUpListener1,foo.bar.StartUpListener2### A shut down listener class name (must implements com.opensymphony.webwork.dispatcher.ShutDownListener### interface) that will get invoked only once when WebWork shuts down. The class names could be### comma separated and will be executed in order.##webwork.dispatcher.shutDownListener=foo.bar.ShutDownListener1,foo.bar.ShutDownListener2
文件说明

default.properties是Webwork的缺省配置文件,可以被classpath根目录下的 webwork.properties 文件覆盖

配置工厂

指定用来配置webwork的 Configuration.
用户可以扩展 com.opensymphony.webwork.config.Configuration 来创建自己的方式来获取配置参数以传给webwork
# webwork.configuration=com.opensymphony.webwork.config.DefaultConfiguration

指定locale,编码

用来设置你的缺省 locale和编码方案
# webwork.locale=en_US
webwork.i18n.encoding=UTF-8

Object Factory

如果指定了,缺省的ojbect factory在这里可以被覆盖
注意:缩写在某些情况下是支持的,例如 "spring" .作为代替,你可以提供一个 com.opensymphony.xwork.ObjectFactory 子类的名称
# webwork.objectFactory = spring

自动装配策略

指定当使用SpringObjectFactory时的自动装配逻辑.
合法值包括: name, type, auto, 和 constructor (缺省为 name )
webwork.objectFactory.spring.autoWire = name

类缓存

标识webwork-spring集成,如果类实例应该被缓存
这可能,直到将来Spring版本让它变得可能,否则就保持它为true
除非你确切的知道你在做什么,否则不要改变
合法的值包括: true, false (true 是缺省的)
webwork.objectFactory.spring.useClassCache = true

缺省对象类型裁决者

如果设定了,缺省的对象类型裁决者可以被覆盖

注意: 缩写在某些情况下支持,例如 "tiger" or "notiger"
作为代替,你可以提供一个 com.opensymphony.xwork.util.ObjectTypeDeterminer 实现类的名字
注意: 如果在classpath里有 xwork-tiger.jar, GenericsObjectTypeDeterminer 缺省会被使用
关闭tiger支持,在这里使用 "notiger" 属性值.
#webwork.objectTypeDeterminer = tiger
#webwork.objectTypeDeterminer = notiger

文件上传设置

用来处理HTTP POST请求,编码使用MIME-type multipart/form-data方式的
# webwork.multipart.parser=cos
# webwork.multipart.parser=pell
webwork.multipart.parser=jakarta
保存的目录缺省使用 javax.servlet.context.tempdir
webwork.multipart.saveDir=
webwork.multipart.maxSize=2097152

定制配置

装载定制的属性文件(不会覆盖webwork.properties!)
# webwork.custom.properties=application,com/webwork/extension/custom

缺省URL映射处理器

用来处理request URL如何映射到action,或者相反的映射(用户可以实现自己的处理)
webwork.mapper.class=com.opensymphony.webwork.dispatcher.mapper.DefaultActionMapper

缺省后缀

DefaultActionMapper使用的设置
你可以提供一个逗号分割的列表,例如 webwork.action.extension=action,jnlp,do
webwork.action.extension=action

是否静态文件由FilterDispatcher服务

FilterDispatcher使用的设置
如果为true,那么WebWork将会为它jar包内的静态文件提供服务.
如果为false,那么静态文件必须在<context_path>/webwork下面可以访问
webwork.serve.static=true

标签语法设定

使用 alternative syntax 在大多数地方需要 %{} 来计算标签的字符串属性的值
webwork.tag.altSyntax=true

开发模式设定

当设置为true时,WebWork会对开发者更友好.这包括:
webwork.i18n.reload = true
webwork.configuration.xml.reload = true
引发不同的调试信息或者忽略的问题为错误信息
例如: 正常情况下,一个请求 foo.action?someUnknownField=true 会被忽略(从web过来的任何值,都是不可信的).
因此,在开发的时候,当这些错误发生时立刻提醒,这可能是有用的
webwork.devMode = false
译注:设置为true时,所有有名字(name)的input都必须有对应的setter,否则会报错.如果不需要,请删除name.

国际化资源设定

当设置为true,资源包会在每个请求时自动重新载入.
这在开发时很方便,但是不应该在生产状态下使用
webwork.i18n.reload=false

theme和模板设定

标准的UI theme
改变这个会映射缺省由那个路径的模板来输出JSP控件标签
webwork.ui.theme=xhtml
webwork.ui.templateDir=template

设置缺省模板类型,可以是ftl,vm,jsp
webwork.ui.templateSuffix=ftl

配置自动更新设定

配置自动重新装载,这会导致配置来重新载入xwork.xml, 当它改变的时候
webwork.configuration.xml.reload=false

Velocity配置设定

velocity.properties 文件的位置.缺省是 velocity.properties
# webwork.velocity.configfile = velocity.properties

逗号分割的 VelocityContext 类名来链接到 WebWorkVelocityContext
# webwork.velocity.contexts =

URL相关设定

用来构建URL,例如UrlTag
webwork.url.http.port = 80
webwork.url.https.port = 443

自定义国际化资源

装载自定义的缺省资源包(如果有多个,用逗号分割)
# webwork.custom.i18n.resources=testmessages,testmessages2

应用服务器相关设定

有些app server不能处理HttpServletRequest.getParameterMap(),经常使用的是WebLogic,Orion和OC4J
webwork.dispatcher.parametersWorkaround = false

FreeMarker相关设定

配置要用的 Freemarker Manager 类

允许用户插入自定义的 Freemarker Manager ,如果需要的话
必须扩展 com.opensymphony.webwork.views.freemarker.FreemarkerManager
#webwork.freemarker.manager.classname=com.opensymphony.webwork.views.freemarker.FreemarkerManager

浏览 WebWorkBeanWrapper 的javadoc 了解更多信息
webwork.freemarker.wrapper.altMap=true

XSLTResult相关设定

配置 XSLTResult 类使用 stylesheet 缓存.
开发时设置为true,生产时设置为false.

  相关解决方案