Servlet的几种跳转(转)
摘要:
源地址:http://hi.baidu.com/awmtaplnaibmnxq/item/29d76f3dafcf00312e20c482Servlet: 当然,在servlet中,一般跳转都发生在doGet, doPost等方法里面。一、原理1) redirect 方式 response.sendRedirect("/a.jsp"); 页面的路径是相对路径。sendRedirect可以将页面跳转到任何页面,不一定局限于本web应用中,如: response.sendRedirect("http://www.ycul.com"); 跳转后浏览器地址栏变化 阅读全文