weblogic+jsp+oracle+中文乱码(30分)

  • 主题发起人 zhang12321
  • 开始时间
Z

zhang12321

Unregistered / Unconfirmed
GUEST, unregistred user!
请教一下:
我的一个方法里有一句为:throw new Exception("此记录已经存在!!!");
我调用这个方法的jsp为
<%@ page contentType="text/html;
charset=GB2312" %>
<%@ page errorPage="/jsp/Error.jsp" buffer="1kb" %>
<%@ page import="com.ort.dbtools.ParamUtils"%>
<%@ page import="com.ort.dbclass.DBCustBronze"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=gb2312">
<link rel="stylesheet" href="../../images/style.css" type="text/css">
</head>
<。。。。。。
DBCustBronze dbCustBronze=new DBCustBronze(request);(此方法)
。。。。。
它会产生上述exception
我的error页为:
<%@ page contentType="text/html;
charset=GB2312" %>
<%@ page isErrorPage="true" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=gb2312">
<link rel="stylesheet" href="../../images/style.css" type="text/css">
<title>
出错了
</title>
</head>
<body>
<%
//<%@ page contentType="text/html;
charset=GB2312"
//String msg=new String(request.getParameter("message").getBytes("ISO8859_1"),"GB2312");
//String msg=request.getParameter("message");
%>
<center>
<p color="red"><h3>出错了:<%=exception.getMessage() %></h3></p>
</center>
</body>
</html>
问题:
为何显示出来的全部是“??????????。。。。??!!!”
怎么解决啊???
本人已用去3个小时了!!
谢谢!!
另外:
用new String(exception.getMessage().getBytes("ISO8859-1"),"GB2312")也不行
去掉ISO8859-1也不行
求教 !!!
 
试试这个
new String(exception.getMessage().getBytes("8859_1"))
 
我知道为什么了
谢谢!!
 
接受答案了.
 
顶部