汉字乱码,response.getWriter().print("好"),后台输出文字到jsp显示

out = response.getWriter();
out.print("234234234");


下边这个可以把值传到jsp显示出来
PrintWriter out = null;	//打印流 
 try {
	 response.setCharacterEncoding("UTF-8"); // 先指定输出流的编码
	 out = response.getWriter();
	 out.print("234234234");
} catch (IOException e1) {
	 e1.printStackTrace();
}


黑色头发:http://heisetoufa.iteye.com

你可能感兴趣的:(java,jsp)