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进行中文转码。
分享到:
相关推荐
NULL 博文链接:https://xienan123.iteye.com/blog/1042124
redirectaction 出现404 - result 'null' not found例子演示
NULL 博文链接:https://ontheroad-luckhouge.iteye.com/blog/2230835
- The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: E:\Java\jre1.5.0_17\bin;.; - Initializing Coyote ...
SSI2 Struts2+Spring2.5+IBatis2 配置 log4j.jar 版本不能低于1.2.13 此处为1.2.16,否则报FileNotFound异常
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.6.0_10\bin;C:\Program ...
Gets a message based on a key using the supplied args, as defined in MessageFormat, or, if the message is not found, a supplied default value is returned. String getText(String key, String default...
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre7\bin;C:\Windows\Sun\Java\...
<default name=pagenotfound> <action name=pagenotfound> <result>/pagenotfound.html</result> </action> 这就是说在访问action是.如果没有找到action就访问这个页面,但是我如果我不用.d
Pythons are not cheaper than elephants today. </#if> 2、 switch , case , default , break指令 这些指令显然是分支指令,作用类似于Java的switch语句,switch指令的语法结构如下: <#case refValue>......