第一步:
在 struts.xml 加 <constant name="struts.i18n.encoding" value="GBK"/><!--国际化信息内码-->
另外记住<wbr>jsp页面用的什么<a href="http://wenwen.soso.com/z/Search.e?sp=S%E7%BC%96%E7%A0%81&ch=w.search.yjjlink&cid=w.search.yjjlink" target="_blank"><span style="color:#005599">编码</span></a>,struts.xml中就用什么编码,例如如果在struts的配置文件中指定的是gbk 那么你页面用gb2312和gbk都可以,不要用utf-8,如果你struts配置文件中是utf-8,那么页面就用utf-8 不要用gb2312和gbk</wbr>
第二步:
在web.xml中这样配置
加入这样一句代码
结果变成这样