jsp到jsp传递中文字符乱码

来源:互联网 发布:mac地址的组成 编辑:程序博客网 时间:2024/05/09 06:37

jsp1向jsp2传递的内容包括中文字符的解决方法。

在jsp2上

String text1 = request.getParameter("abc");

String text2 = new String(text1 .getBytes("ISO8859_1"),"gbk");


这样,在jsp2上使用text2就是正确的了。

0 0