服务端跳转和客户端跳转的区别:
if ("admin".equals(name) && "123".equals(password)) { //服务端跳转 req.getRequestDispatcher("success.html").forward(req, resp); // resp.sendRedirect("success.html"); } else { //客户端跳转 resp.sendRedirect("fail.html"); }
服务端跳转和客户端跳转的区别:
if ("admin".equals(name) && "123".equals(password)) { //服务端跳转 req.getRequestDispatcher("success.html").forward(req, resp); // resp.sendRedirect("success.html"); } else { //客户端跳转 resp.sendRedirect("fail.html"); }
转载于:https://www.cnblogs.com/Ravenzzz/p/11353226.html