public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { //meta 模拟头部 String msg = "<meta http-equiv='refresh' content='3;url:www.baidu.com'>jump to another page!"; //传数据 this.getServletContext().setAttribute("msg", msg); //显示JSP this.getServletContext().getRequestDispatcher("/msg.jsp").forward(request, response); }