struts2的常用属性配置

struts.devMode = false

//是否选择开发模式,若为true的话,就会有更多的提示。开发阶段建议为true。

struts.i18n.encoding=UTF-8

//要是有中文请求,可以将这个改为GBK或者GBK2312。

struts.multipart.parser=jakarta

struts.multipart.saveDir=

struts.multipart.maxSize=2097152

//这三个是关于上传功能的。

struts.mapper.alwaysSelectFullNamespace=false

//将HTTP请求映射到Action的映射器。

struts.action.extension=action

//所有匹配*.action的请求都由struts2处理。

struts.serve.static.browserCache=true

//这个在开发阶段可以改为false,设置浏览器是否缓存静态内容。

struts.enable.DynamicMethodInvocation = true

//是否支持动态调用

struts.enable.SlashesInActionNames = false

//是否能在Action中使用斜线

struts.tag.altSyntax=true

//表达式语法,建议为true默认就好。

struts.i18n.reload=false

//是否每次HTTP请求到达时,系统都重新加载资源文件。开发阶段建议为true。

struts.ui.theme=xhtml

//默认的视图主题

struts.ui.templateDir=template

//指定模板文件的位置,默认为template。

struts.ui.templateSuffix=ftl

//指定模板文件的后缀。可以有三种选择:flt,vm或jsp。分别对应:FreeMarker、Velocity和jsp模板。

struts.configuration.xml.reload=false

//当struts.xlm文件改变后,系统是否自动重新加载该文件。

struts.velocity.configfile = velocity.properties

//指定Velocity框架所需的velocity.properties文件的位置。

struts.velocity.contexts =

struts.velocity.toolboxlocation=

//这三个都是关于Velocity框架的工具文件位置。

struts.url.http.port = 80

struts.url.https.port = 443

//端口位置设置

struts.url.includeParams = get

struts.dispatcher.parametersWorkaround = false

//对于特殊Java EE的服务器,才要改。

struts.xslt.nocache=false

//是否使用样式表缓存。开发阶段建议为true。

struts.configuration.files=struts-default.xml,struts-plugin.xml,struts.xml

//默认加载的配置文件


不建议动的:

struts.objectFactory.spring.autoWire = name

struts.objectFactory.spring.useClassCache = true

struts.serve.static=true

//关于JRE的

struts.freemarker.templatesCache=false

struts.freemarker.wrapper.altMap=true

猜你喜欢

转载自z773171880.iteye.com/blog/1304957