第一:
在jsp页面加入:
<%@ page contentType="text/html; charset=gb2312" %>
这样就可以解决了在送一个,如何和数据转化因为数据库和app(包括页面),用的编码方式不同。
数据库的中文数据必须经过以下转换
String sApp = new String(rs.getString(1).getBytes("iso-8859-1"),"gb2312")反之
String sDB = new String(sDB.getBytes("gb2312"),"iso-8859-1")