专注于互联网--专注于架构

最新标签
网站地图
文章索引
Rss订阅

首页 »Java教程 » struts2配置:配置Struts2的struts.properties »正文

struts2配置:配置Struts2的struts.properties

来源: 发布时间:星期四, 2009年1月15日 浏览:34次 评论:0
  struts.properties文件在WEB-INF/es目录下存放

  这个文件用来配置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->org.apache.struts2.dispatcher.FilterDispatcher</filter->
  <init-param>
    <param-name>struts.i18n.encoding</param-name>
    <param-value>true</param-value>
  </init-param>
</filter>


0

相关文章

读者评论

发表评论

  • 昵称:
  • 内容: