response.sendRedirect("xx")相对路径 ----localhost:8080/myapp/xx
response.sendRedirect("/xx")相对于服务器跟路径 ----localhost:8080/xx,,可用request.getContextPath()得到应用名称/myapp
response.sendRedirect("http://fgfd") ----
http://fgfd
request.getRequestDispatcher("/xx"或"xx").forward(request,response)相对于web应用跟路径----localhost:8080/myapp/xx
而在springmvc的controller中,return "redirect: /xx" 表示相对web应用路径 -----localhost:8080/myapp/xx
return "redirect: xx" 表示相对当前路径,当前若为localhost:8080/myapp/dd/dd ----localhost:8080/myapp/dd/xx