jsp页面用UTF-8编码如何支持中文信息显示
<%@ page contentType="text/html; charset=UTF-8"%>
统一编码,页面使用UTF-8,数据库也用,同时TOMCAT的POST和GET方式传数据也要设置为UTF-8,
POST方式好说,request.setCharacterEncoding("UTF-8")就可以了,GET方式就要修改server.xml
<Connector port="80" maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100" debug="0"
connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="UTF-8"/>