Struts2的struts.properties文件在哪儿啊?
来源:互联网 发布:出售淘宝0心店铺 编辑:程序博客网 时间:2024/05/17 01:16
2011-04-03 21:59jingaita | 分类:JAVA相关 | 浏览10600次
老师教我们Struts2的时候叫我们建了个Struts.xml文件啊?那struts.properties呢?不需要吗?
2011-04-03 22:51提问者采纳
struts.properties 是可以不要的!!!因为 struts.xml文件中 有 <constant> 这个节点, 你可以把你想写在struts.properties的自定义配置写在 struts.xml文件当中.例如,你想 开启 struts2 的开发模式可以直接在 struts.xml文件当中写上.<constant name="struts.devMode" value="true“>不用再去 去创建 一个 struts.properties,并写上 struts.devMode = true所有的配置项目,其实 你可以去看看 struts2 默认的配置文件 default.properties.位置在 struts2-core-2.x.x.jar 的 org.apache.struts2 包 下面的当然,你可能又会问了,如果同时都在两个文件配置了,一个相同的项目,哪个是有效的呢他其实是有一个加载顺序的: 先加载 struts.xml,再加载 struts.properties也就是说 struts.properties 是可以覆盖 struts.xml里面的 配置的,具体 是否 要 struts.properties ,还是得根据 具体情况,具体分析吧,不过 我基本上不用,免得 出现 配置混乱的情况.呵呵 PS: struts.xml 不能写成Struts.xml 哟 ,注意首字母 s不能写成大写了.
- 提问者评价
谢谢~~~
0 0
- Struts2的struts.properties文件在哪儿啊?
- Struts2的struts.properties文件
- Struts2 Struts.properties文件
- struts2的struts.properties文件详解
- struts2的struts.properties文件详解
- Struts2的default.properties和struts.properties文件
- struts2中struts.properties属性文件的详解
- Struts2核心配置文件“struts.properties”文件的配置
- struts2的struts.properties详解
- Struts2的struts.properties配置
- struts2 struts.properties 的详解
- struts2 struts.properties 的详解
- struts2的struts.properties配置文件
- struts2的struts.properties详解
- struts2.struts.properties的配置
- struts2的struts.properties配置文件
- struts2的struts.properties配置文件
- struts2的struts.xml struts.properties配置文件
- <grant-uri-permission>
- <instrumentation>
- linux网络编程二十二:高性能定时器之时间轮
- <intent-filter>
- <manifest>
- Struts2的struts.properties文件在哪儿啊?
- <meta-data>
- 开源界的5大开源许可协议
- <path-permission>
- <permission>
- 核心技术笔记_重要的java.lang.string:、 String类中的一些重要的方法(2014.04.16 day36)
- javascript的函数内部变量的作用域
- <permission-group>
- Java ee+tomcat相关问题