我有二个jsp文件:
第一个:(indext.jsp)
<%@ page language="java" contentType="text/html;charset=gb2312" pageEncoding="gb2312"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>测试</title>
</head>
<body>
<form action="display.jsp" method="get">
<input type="text" name="display"/>
<input type="submit" value="确定"/>
<input type="reset" value="重设"/>
</form>
</body>
</html>
第二个(display.jsp)
<%@ page language="java" contentType="text/html;charset=gb2312"pageEncoding="gb2312"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>显示</title>
</head>
<body>
<%
request.setCharacterEncoding("gb2312");
%>
<%=request.getParameter("display")%>
<br>
编码方式为:
<%=request.getCharacterEncoding()%>
</body>
</html>
他的编码方式是gb2312,为何显的还是?????ü,真想不通啊?