[color=red]struts.properties[/color]
这个文件提供了一种更改框架默认行为方式的机制。
在"struts.properties"文件中定义的属性都可以在web.xml文件的[color=red]init-param[/color]标签中进行配置,或者通过struts.xml文件的[color=red]"constant"[/color]标签来修改。
在struts2-core的jar发行版中,有一个默认文件default.properties。如果要对属性进行修改的话,只需要在项目的源代码目录下,创建一个叫"struts.propterties"的文件,然后吧想要修改的属性添加到文件中,新的属性就会把默认属性覆盖掉。
在开发环境中,以下几个属性可能会被修改:
# struts.i18n.reload = true
- 激活重新载入国际化文件的功能。
# struts.devMode = true
- 激活开发模式,以提供更全面的调试功能。
# struts.configuration.xml.reload = true
- 激活重新载入.xml文件的功能。
# struts.url.http.port = 8080
- 配置服务器运行的端口号
这个文件提供了一种更改框架默认行为方式的机制。
在"struts.properties"文件中定义的属性都可以在web.xml文件的[color=red]init-param[/color]标签中进行配置,或者通过struts.xml文件的[color=red]"constant"[/color]标签来修改。
在struts2-core的jar发行版中,有一个默认文件default.properties。如果要对属性进行修改的话,只需要在项目的源代码目录下,创建一个叫"struts.propterties"的文件,然后吧想要修改的属性添加到文件中,新的属性就会把默认属性覆盖掉。
在开发环境中,以下几个属性可能会被修改:
# struts.i18n.reload = true
- 激活重新载入国际化文件的功能。
# struts.devMode = true
- 激活开发模式,以提供更全面的调试功能。
# struts.configuration.xml.reload = true
- 激活重新载入.xml文件的功能。
# struts.url.http.port = 8080
- 配置服务器运行的端口号