代码块
java重定向:
①相对路径:response.sendRedirect("Manager/index.jsp")
生成的地址:原来请求地址+参数生成完整的URL即:
http://localhost:8080/项目名/Manager/index.jsp
②绝对路径:response.sendRedirect("/Manager/index.jsp")
生成的地址:web服务器本身地址+参数生成完整的URL 即:
http://localhost:8080/Manager/index.jsp
③其他web应用地址
response.sendRedirect("http://www.baidu.com
")
容器直接定向到该URL。