struts2学习总结
2011-03-24 18:03
381 查看
struts.properties配置
struts.properties文件在WEB-INF/classes目录下存放。
这个文件用来配置Struts2系统的一些基本规约,所有在struts.properties中配置的内容都可以在struts.xml中配置,或者web.xml中在struts2 filter中配置,例如:
Struts.properties中的如下配置:
struts.i18n.encoding=UTF-8
相当于struts.xml中的如下配置:
<constant name=“struts.i18n.encoding” value=“true” />
相当于web.xml中的如下配置:
<filter>
<filter-name>struts</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
<init-param>
<param-name>struts.i18n.encoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
struts.properties文件在WEB-INF/classes目录下存放。
这个文件用来配置Struts2系统的一些基本规约,所有在struts.properties中配置的内容都可以在struts.xml中配置,或者web.xml中在struts2 filter中配置,例如:
Struts.properties中的如下配置:
struts.i18n.encoding=UTF-8
相当于struts.xml中的如下配置:
<constant name=“struts.i18n.encoding” value=“true” />
相当于web.xml中的如下配置:
<filter>
<filter-name>struts</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
<init-param>
<param-name>struts.i18n.encoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
相关文章推荐
- Struts2学习总结(三):Action与ActionSupport
- Struts2学习总结(七):Struts中的OGNL
- Struts2学习总结
- Struts2基础学习总结
- Struts2基础学习总结
- Java_WEB开发_struts2学习的总结_Iterate标签遍历
- 学习struts2建bbs总结四:解决jsp/action中文传值乱码问题
- Struts2学习总结
- Struts学习总结(九)---使用Struts2实现用户信息的CRUD操作(四:删除操作)
- Struts2基础学习总结
- Struts2之struts2学习总结
- struts2学习 EL表达式总结
- Java_WEB开发_struts2学习的总结
- Struts2基础学习总结
- 关于struts2传值方式的一些学习总结
- Java_WEB开发_struts2学习的总结_Iterate标签遍历
- Struts2学习总结1
- Struts2拦截器总结学习
- Java_WEB开发_struts2学习的总结_Iterate标签遍历
- 关于Struts2的学习总结第一天