struts2配置文件:Struts2的properties配置文件详解来源: 发布时间:星期三, 2009年2月11日 浏览:26次 评论:0
###指定加载struts2配置文件管理器默认为org.apache.struts2.config.DefaultConfiguration
###开发者可以自定义配置文件管理器该类要实现Configuration接口可以自动加载struts2配置文件 #struts.configuration=org.apache.struts2.config.DefaultConfiguration ###设置默认locale和编码 #struts.locale=en_US struts.i18n.encoding=UTF-8 ###指定struts工厂类 #struts.objectFactory=spring ###指定spring框架装配模式 ###装配方式有:name,type,auto,andconstructor(name是默认装配模式) struts.objectFactory.spring.autoWire=name ###该属性指定整合spring时是否对bean进行缓存Cache值为trueorfalse,默认为true. struts.objectFactory.spring.useClassCache=true ###指定类型检查 #struts.objectTypeDeterminer=tiger #struts.objectTypeDeterminer=notiger ###该属性指定处理MIME-typemultipart/form-data文件上传 #struts.multipart.parser=cos #struts.multipart.parser=pell struts.multipart.parser=jakarta #指定上传文件时临时目录默认使用javax.servlet.context.tempdir struts.multipart.saveDir= struts.multipart.maxSize=2097152 ###加载自定义属性文件(不要改写struts.properties!) #struts.custom.properties=application,org/apache/struts2/extension/custom ###指定请求url和action映射器默认为org.apache.struts2.dispatcher.mapper.DefaultActionMapper #struts.mapper.=org.apache.struts2.dispatcher.mapper.DefaultActionMapper ###指定action后缀默认为action struts.action.extension=action ###被FilterDispatcher使用 ###如果为true则通过jar文件提供静态内容服务. ###如果为false则静态内容必须位于<context_path>/struts struts.serve.=true ###被FilterDispatcher使用 ###指定浏览器是否缓存Cache静态内容测试阶段设置为false发布阶段设置为true. struts.serve..browserCache=true ###设置是否支持动态思路方法true为支持false不支持. struts.enable.DynamicMethodInvocation=true ###设置是否可以在action中使用斜线默认为false不可以想使用需设置为true. struts.enable.SlashesInActionNames=false ###是否允许使用表达式语法默认为true. struts.tag.altSyntax=true ###设置当struts.xml文件改动时是否重新加载. ###-struts.configuration.xml.reload=true ###设置struts是否为开发模式默认为false,测试阶段般设为true. struts.devMode=false ###设置是否每次请求都重新加载资源文件默认值为false. struts.i18n.reload=false ###标准UI主题 ###默认UI主题为xhtml,可以为simple,xhtml或ajax struts.ui.theme=xhtml ###模板目录 struts.ui.templateDir=template #设置模板类型.可以为ftl,vm,orjsp struts.ui.templateSuffix=ftl ###定位velocity.properties文件. 默认velocity.properties struts.velocity.configfile=velocity.properties ###设置velocitycontext. struts.velocity.contexts= ###定位toolbox. struts.velocity.toolboxlocation= ###指定web应用端口. struts.url.http.port=80 ###指定加密端口 struts.url.https.port=443 ###设置生成url时是否包含参数.值可以为:none,getorall struts.url.Params=get ###设置要加载国际化资源文件以逗号分隔. #struts.custom.i18n.resources=testmessages,testmessages2 ###对于些web应用服务器不能处理HttpServletRequest.getParameterMap ###像WebLogic,Orion,andOC4J等须设置成true,默认为false. struts.dispatcher.parametersWorkaround=false ###指定freemarker管理器 #struts.freemarker.manager.name=org.apache.struts2.views.freemarker.FreemarkerManager ###设置是否对freemarker模板设置缓存Cache ###效果相当于把template拷贝到WEB_APP/templates. struts.freemarker.templatesCache=false ###通常不需要修改此属性. struts.freemarker.wrapper.altMap=true ###指定xsltresult是否使用样式表缓存Cache.开发阶段设为true,发布阶段设为false. struts.xslt.nocache=false ###设置struts自动加载文件列表. struts.configuration.files=struts-default.xml,struts-plugin.xml,struts.xml ###设定是否直在最后个slash的前任何位置选定. struts.mapper.alwaysSelectFullNamespace=false 0
相关文章
读者评论发表评论 |