JSP使用get方式传递中文接受时出现乱码

tomcat默认的编码是’ISO8859_1‘但是页面编码不是这个编码,所以中文会出现乱码

fileName=三体,是参数fileName

String fileName=new String(request.getParameter("fileName").getBytes("ISO8859_1"))


你可能感兴趣的:(JSP使用get方式传递中文接受时出现乱码)