TOMCAT不显示汉字
我的TOMCAT是网络上下载的5。5压缩把版本。可以显示我的JSP文件。 但是不显示文件里的汉字。。。。数字和英文都可以。
这是什么问题啊
新手问题
回复 1# 的帖子
<%@ page contentType="text/html;charset=gb2312"%>不要用iso... 将charset全部换成UTF-8 public static String toChinese(String strvalue) {
try {
if (strvalue == null || strvalue == "") {
return null;
}
else {
strvalue = new String(strvalue.getBytes("ISO8859_1"), "GBK");
return strvalue;
}
}
catch (Exception e) {
return null;
}
}
页:
[1]
