`
machunlin
  • 浏览: 26450 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

struts国际化报not found

阅读更多
struts国际化报not found
自己写的示例程序报错:
Resource ApplicationResources_zh_CN.properties Not Found.
检查发现struts-config.xml没错:
<!-- 注意,不要把资源文件的扩展名写进去了 -->
<message-resources
parameter="com.card.resource.ApplicationResources">
</message-resources>
几个资源文件如ApplicationResources_zh_CN.properties也没错。
搞了半天才发现原来web.xml里也要加上一句:
<servlet><!-- 国际化时添加的语句 -->
<init-param><param-name>application</param-name>
<param-value>com.card.resource.ApplicationResources </param-value></init-param>
</servlet>
最后别忘了用%java_home%\bin\native2ascii.exe进行中文转码。
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics