public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
request.setCharacterEncoding("GB2312");
response.setContentType("text/html;charset=GB2312");
PrintWriter out = response.getWriter();
/*out
.println("<!DOCTYPE HTML PUBLIC /"-//W3C//DTD HTML 4.01 Transitional//EN/">");
out.println("<HTML>");
out.println(" <HEAD><TITLE>A Servlet</TITLE></HEAD>");
out.println(" <BODY>");
out.print(" This is ");
out.print(this.getClass());*/
out.println(" using the GET method");
/*out.println(" </BODY>");
out.println("</HTML>");
out.flush();
out.close();*/
String parameter = new String(request.getParameter("name"));
parameter = new String(parameter.getBytes("8859_1"),"gb2312");
out.println("获得了以下的参数:name=");
out.println(parameter);
/*out.println("获得了以下的参数值:name="+request.getParameter("name"));*/
out.flush();
out.close();
}