getRequestDispatcher(path).include(req, res)

在响应中包含资源内容
request.getRequestDispatcher("/public/head.jsp").include(request, response);
response.getWriter().write("test");
request.getRequestDispatcher("/public/foot.jsp").include(request, response);



你可能感兴趣的:(getRequestDispatcher(path).include(req, res))