要通过页面往数据库中添加中文信息,有时候会出现中文乱码,Struts2框架提供了一个很简单的解决方法,那就是,在struts.xml文件中添加下述语句: <constant name="struts.i18n.encoding" value="gb2312"/>