在struts-config.xml中加:<message-resources parameter="com.your.ApplicationResources_zh_CN"/>ApplicationResources_zh_CN应该位于/web-inf/classes/com/your 目录下,
或/web-inf/lib目录下的jar包中去掉web.xml中的application参数
或/web-inf/lib目录下的jar包中去掉web.xml中的application参数
我按照你说的设置了,还是乱码。还有什么地方不对吗?
如果message值是英文的,就没有问题。
如何用字符集过滤器?
这应该表示转换没什么问题。
request.setCharacterEncoding(encoding);
super.process(xxx);
然后替换web.xml中的:
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
就可以了。