C
chengang_1981
Unregistered / Unconfirmed
GUEST, unregistred user!
<%@ page contentType="text/html;
charset=gb2312"
language="java"
import="java.sql.*"
errorPage=""
%>
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html;
charset=gb2312">
<title>无标题文档</title>
</head>
<%
String kn=null;
kn="陈刚";
%>
<body>
<jsp:forward page="test1.jsp"
>
<jsparam name="kn"
value="<%=kn%>"
/>
</jsp:forward>
</body>
</html>(第一页代码)
==================================================
<%@ page contentType="text/html;
charset=gb2312"
language="java"
import="java.sql.*"
errorPage=""
%>
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html;
charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<%String kn=request.getParameter("kn"
String result=new String(kn.getBytes("gb2312");
%>
<%=result%>
</body>
</html>(第2页代码)
===========================================
就是这两个简单页面,第一页往第二页传一个中文字符串,,然后在第2页显示,,但是却总显示乱码,,请教各位大虾这个问题如何解决?
谢谢
charset=gb2312"
language="java"
import="java.sql.*"
errorPage=""
%>
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html;
charset=gb2312">
<title>无标题文档</title>
</head>
<%
String kn=null;
kn="陈刚";
%>
<body>
<jsp:forward page="test1.jsp"
>
<jsparam name="kn"
value="<%=kn%>"
/>
</jsp:forward>
</body>
</html>(第一页代码)
==================================================
<%@ page contentType="text/html;
charset=gb2312"
language="java"
import="java.sql.*"
errorPage=""
%>
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html;
charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<%String kn=request.getParameter("kn"
String result=new String(kn.getBytes("gb2312");
%>
<%=result%>
</body>
</html>(第2页代码)
===========================================
就是这两个简单页面,第一页往第二页传一个中文字符串,,然后在第2页显示,,但是却总显示乱码,,请教各位大虾这个问题如何解决?
谢谢