import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.*;
import javax.servlet.http.*;
public class DzLogin extends HttpServlet{
static final private String CONTENT_TYPE= "text/html;
charset=GBK";
//声明中文字符集
public voiddo
Post(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType(CONTENT_TYPE);
//设置显示中文字符
PrintWriter out= response.getWriter();
out.print("对不起哈哈哈哈哈哈哈哈 !");
String s1= request.getParameter("s1").trim();
s1=new String(s1.getBytes("iso-8859-1"),"GBK");
//把经过编码数据查入数据库就不会乱码了
}
}