為了解決form提交到action中的中文參數(shù)亂碼問題。
1.在struts2-core-2.0.0-SNAPSHOT.jar包中路徑為struts2-core-2.0.6\org\apache\struts2有一個default.properties 文件,把struts.i18n.encoding=UTF-8改為struts.i18n.encoding=GBK
2.或者在struts.xml文件內(nèi)添加常量:
<constant name="struts.i18n.encoding" value="GBK"/>