设置tomcat的编码格式。把以下内容放到你的web.xml中。 < mime-mapping > < extension > htm </ extension > < mime-type > text/html;charset=utf-8 </ mime-type > </ mime-mapping > < mime-mapping > < extension > html </ extension > < mime-type > text/html;charset=utf-8 </ mime-type > </ mime-mapping > < mime-mapping > < extension > jsp </ extension > < mime-type > text/html;charset=utf-8 </ mime-type > </ mime-mapping > < mime-mapping > < extension > action </ extension > < mime-type > text/html;charset=utf-8 </ mime-type > </ mime-mapping > 还可以用以下方法 < jsp-config > < jsp-property-group > < description > test encode </ description > < display-name > test encode </ display-name > < url-pattern > /* </ url-pattern > < page-encoding > utf-8 </ page-encoding > </ jsp-property-group > </ jsp-config >