乱码解决:
1、servlet输出中文:
response.setContentType("text/html;charset=utf-8");
表单乱码
提交表单时加上
<meta http-equiv="content-type" content="text/html;charset=utf-8">
读取时
request.setCharacterEncoding("utf-8");
乱码解决:
1、servlet输出中文:
response.setContentType("text/html;charset=utf-8");
表单乱码
提交表单时加上
<meta http-equiv="content-type" content="text/html;charset=utf-8">
读取时
request.setCharacterEncoding("utf-8");