request实现页面包含

 package cn.itcast.request;

 import java.io.IOException;

 import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import cn.itcast.User; //用include实现页面包含
public class RequestDemo extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException { request.getRequestDispatcher("/MyJsp.jsp").include(request, response);
response.getWriter().write("heihei!");
} public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException { } }
上一篇:HTML5 video 支持air play


下一篇:python定时执行任务的三种方式