Struts_default.properties文件注释

指定web应用的默认编码集,可为GBK/GB2312
struts.i18n.encoding=UTF-8
指定Struts2框架默认加载的配置文件
Struts..configuration.files=struts-default.xml,struts.xml,strtus-plugin.xml
指定Struts2应用加载用户自定义的属性文件,不覆盖 struts.properties中的属性
struts.custom.properties=application,org/apache/struts2/extension/custom
指定需要Strtus2处理的请求后缀,eg:*.do 或 *.action 或 *
struts.action.extension=action,

设置Struts2是否使用开发模式,开发时可设置为true,应用出错时显示更多、更友好的出错信息,便于调错;发布阶段设为false。
### includes:若为true,以下两个属性也为true(2.3以后)
### - struts.i18n.reload = true
### - struts.configuration.xml.reload = true
struts.devMode=false
设置是否每次HTTP请求到达时,系统都重新加载资源文件
struts.i18n.reload=false
设置是否每次HTTP请求到达时,系统都重新加载配置文件
struts.configuration.xml.reload=false
### Struts2 default.properties  or struts.properties
该属性指定加载Struts2配置文件的配置文件管理器
struts.configuration=org.apache.struts2.config.DefaultConfiguration
指定web应用的默认Locale
# struts.locale=en_US
指定Struts2默认的ObjectFactoryBean,默认为spring
# struts.objectFactory = spring
指定Spring框架的自动装配模式,默认根据Bean的name属性自动装配
struts.objectFactory.spring.autoWire
 = name/type/auto/constructor
该属性指定整合Spring框架时,是否缓存Bean实例,默认ture
struts.objectFactory.spring.useClassCache = true/false
### ensures the autowire strategy is always respected.
### valid values are: true, false (false is the default)
struts.objectFactory.spring.autoWire.alwaysRespect = false
指定Struts2的类型检测机制,通常支持tiger和notiger两个属性值
#struts.objectTypeDeterminer = tiger
#struts.objectTypeDeterminer = notiger
指定处理multipart/form-data的MIME类型(文件上传请求的框架)
# struts.multipart.parser=cos -->cos文件上传框架
# struts.multipart.parser=pell -->pell上传
struts.multipart.parser=jakarta -->common-fileupload文件上传框架,默认jakarta
指定文件上传的临时保存路径,默认:javax.servlet.context.tempdir
struts.multipart.saveDir=
指定文件最大上传字节数,默认:2M
struts.multipart.maxSize=2097152
指定将HTTP请求映射到指定Action的映射器
#struts.mapper.class=org.apache.struts2.dispatcher.mapper.DefaultActionMapper
是否通过JAR文件提供静态内容服务器,默认:true
struts.serve.static=true
设置浏览器是否缓存静态内容,开发阶段可设置为false
struts.serve.static.browserCache=true
设置Strtus2是否支持动态方法调用
struts.enable.DynamicMethodInvocation = true
设置能否在Action name属性中使用/,默认false
### <action name="*/*" method="{2}" class="actions.{1}"> to match "/foo/edit" or "/foo/save".
struts.enable.SlashesInActionNames = false
指定是否允许在Struts2标签中使用表达式语法,默认true
struts.tag.altSyntax=true
指定视图标签默认的视图主题,默认xhtml
struts.ui.theme=xhtml
/archive.ajax/archive.simple/archive.xhtml/css_xhtml/simple
指定视图文件所需模版的位置,默认加载template路径下的模版文件
struts.ui.templateDir=template
指定模版文件的后缀
struts.ui.templateSuffix=ftl  -->FreeMarker
                              vm   -->Velocity   jsp  -->jsp模版
指定velocity框架所需的velocity.properties文件的位置
struts.velocity.configfile = velocity.properties
指定velocity框架的Context位置,多个Context用,隔开
struts.velocity.contexts =
指定velocity框架的toolbox位置
struts.velocity.toolboxlocation=
指定Web应用所在的监听端口
struts.url.http.port = 80
指定Web应用的加密服务端口
struts.url.https.port = 443
指定Struts2生成URL时是否包含请求参数
struts.url.includeParams = none -->不包含
                           get -->仅包含get请求类型的提交
                           all -->包含全部
指定Struts2所需的国际化资源文件,多个用,隔开
# struts.custom.i18n.resources=testmessages,testmessages2
由于某些Java EE服务器(WebLogic,Orion,OC4J),不支持HttpServletRequst调用getParameterMap()方法,此时可设置该属性值为true来解决问题
struts.dispatcher.parametersWorkaround = false
指定Strtus2使用的FreeMarker管理器,默认为Strtus2内建的FreeMarker管理器
#struts.freemarker.manager.classname=org.apache.struts2.views.freemarker.FreemarkerManager
是否隐藏FreeMarkder模版
struts.freemarker.templatesCache=false
### Enables caching of models on the BeanWrapper
struts.freemarker.beanwrapperCache=false
### See the StrutsBeanWrapper javadocs for more information
struts.freemarker.wrapper.altMap=true
### maxStrongSize for MruCacheStorage for freemarker
struts.freemarker.mru.max.strong.size=100
指定XSLT Result 是否使用样式表缓存
struts.xslt.nocache=false
### Whether to always select the namespace to be everything before the last slash or not
struts.mapper.alwaysSelectFullNamespace=false
### Whether to allow static method access in OGNL expressions or not
struts.ognl.allowStaticMethodAccess=false
### Whether to throw a RuntimeException when a property is not found
### in an expression, or when the expression evaluation fails
struts.el.throwExceptionOnFailure=false
### Logs as Warnings properties that are not found (very verbose)
struts.ognl.logMissingProperties=false
### Caches parsed OGNL expressions, but can lead to memory leaks
### if the application generates a lot of different expressions
struts.ognl.enableExpressionCache=true

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章