public void doPost ( HttpServletRequest request,HttpServletResponse response ) throws ServletException,IOException { response.setContentType ( "text/html; charset=gb2312" ); ServletContext sc = getServletContext(); RequestDispatcher rd = null; rd = sc.getRequestDispatcher ( "/index.jsp" ); //定向的页面 rd.forward ( request, response ); }