常量配置的文件
修改常量配置
方式一
在struts.xml文件中修改
<struts>
<constant name="struts.enable.DynamicMethodInvocation" value="false" />
<constant name="struts.devMode" value="true" />
<constant name="struts.custom.i18n.resources" value="upload"/>
</struts>
方式二
独立创建一个struts.properties文件(加载配置文件时候会去读取)
struts.enable.DynamicMethodInvocation=false
struts.ui.theme=simple
struts.devMode=true
常见的常量配置
- struts.i18n.encoding=UTF-8
- 作用于req的setcharcterEncoding
- 作用于freemarker,velocity的输出
- struts.action.extension=action,,
- 作用于资源名后最的支持格式
- struts.enable.DynamicMethodInvocation = false
- 奋斗支持动态方法调用(使用!)
- struts.serve.static.browserCache=true
- 是否打开缓存,开发为false
- struts.ui.theme=xhtml
- 使用的视图主题 改为simple
- struts.i18n.reload = true
- 是否自动加载资源文件(不用重启服务器),开放为true
- struts.configuration.xml.reload=true
- 是否自动加载配置文件(不用重启服务器),开放为true
- struts.devMode=false
- 是否使用开发者模式=自动加载配置和资源文件
开发期间要修改的
struts.devMode=ture; //开启开发者模式
struts.serve.static.browserCache=false;//禁用缓存
struts.ui.theme=simple; //简单视图