@RequestMapping("/test")
public void testVoid(HttpServletRequest request, HttpServletResponse response) throws Exception {
// 编写请求转发的程序
request.getRequestDispatcher("/WEB-INF/pages/success.jsp").forward(request,response);
// 请求的转发另一种写法
// return "forward:/WEB-INF/pages/success.jsp";
}
Spring mvc 转发
最新推荐文章于 2022-05-20 19:36:25 发布