@RequestMapping("/index1")
public void index(HttpServletResponse resp) throws Exception{
resp.sendRedirect("index.html");
}
上面这种办法是HttpServletResponse重定向。
要求是,必须是url路径同一层的,如果url是sys/index1,那么index.html页面必须是在sys文件夹下面。
@RequestMapping("/index1")
public void index(HttpServletResponse resp) throws Exception{
resp.sendRedirect("index.html");
}
上面这种办法是HttpServletResponse重定向。
要求是,必须是url路径同一层的,如果url是sys/index1,那么index.html页面必须是在sys文件夹下面。