- 我最常用的跳转方式:
request.getRequestDispatcher("userLogin.jsp").forward(request, response);
<jsp:forward page="跳转页面"/>
response.sendRedirct("跳转到页面");
response.setHeader();
<%
response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
String newLocn="/index.html";
response.setHeader("Location",newLocn);
%>
部分参考网页:https://www.jb51.net/article/129598.htm