各位这是我的jsp页面,主要的功能是将另一个页面传过来的内容显示出来:现在的问题是我在本地测试环境测试的时候都显示正常,但是换到生产环境显示确实乱码,请指教
<%@page contentType="text/html; charset=utf-8"%>
<%@include file="/commons/taglibs.jsp"%>
<% request.setCharacterEncoding("utf-8");%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body >
<div class="h1">概要描述</div>
<%
String reason=new String(request.getParameter("desc").getBytes("iso-8859-1"),"GBK");
%>
<div style="overflow: scroll;">
<%=reason%>
</div>
</body>
</html>
<%@page contentType="text/html; charset=utf-8"%>
<%@include file="/commons/taglibs.jsp"%>
<% request.setCharacterEncoding("utf-8");%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body >
<div class="h1">概要描述</div>
<%
String reason=new String(request.getParameter("desc").getBytes("iso-8859-1"),"GBK");
%>
<div style="overflow: scroll;">
<%=reason%>
</div>
</body>
</html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货