在數據顯示頁面下
<% request.setCharacterEncoding("GB2312");
response.setContentType("text/html;charset=gbk"); %>
<%@ page language="java" import="java.util.*" pageEncoding="gb2312"%>
<%@page import="mypage.MyPerson;"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'requestForm3.jsp' starting page</title>
<% request.setCharacterEncoding("GB2312");
response.setContentType("text/html;charset=gbk"); %>