配置了视图解析器之后,如何跳到初始的index.jsp

方法1:

@RequestMapping("/returnIndex")
public String returnIndex(){
    
    
    return "redirect:/index.jsp";
}

方法2

@RequestMapping("/returnIndex2")
public void returnIndex2(HttpServletResponse response) throws Exception{
    
    
    response.sendRedirect("/index.jsp");
}