在用ssh写网上商城的时候遇到了看到这样一个配置,配置struts2中配置常量
<constant name="struts.devMode"value="true">有时候会启动开发模式。那么为什么要启动开发模式,
开发模式有什么好处?
当struts的配置文件修改后,系统是否自动重新加载该文件,其中默认值为false,在开发阶段最好true
1、启用了开发模式,可以输出日志记录,便于程序设计。
2、启动开发模式以后,你在struts.xml配置文件中修改后就不用重新部署项目了。
3、开发模式下设为true,这样可以打印出更详细的错误信息
下面是4个开发模式常用配置的简介---
<!-- 开启使用开发模式,详细错误提示 -->
<!-- <constant name="struts.devMode" value="true"/>-->
<!-- 指定每次请求到达,重新加载资源文件 -->
<!-- <constant name="struts.i18n.reload" value="true"/>-->
<!-- 指定每次配置文件更改后,自动重新加载 -->
<!-- <constant name="struts.configuration.xml.reload" value="true"/>-->
<!-- 指定XSLT Result使用样式表缓存 -->
<!-- <constant name="struts.xslt.nocache" value="true"/>-->