]; 2. Through front-end js, such as [window.location.href = "index.html" 】."/> ]; 2. Through front-end js, such as [window.location.href = "index.html" 】.">
1. Page tag
<a href="index.html">
2. Front-end js
(recommended video tutorial: java video tutorial)
window.location.href = "index.html"
3. Page forwarding
The front-end actually only sends one request, and the two back-end requests share the request and response objects.
request.getServletContext().getRequestDispatcher("index.html").forward(request, response);
4. Page redirection
Tell the front end to resend the request. The two requests are separate.
response.sendRedirect("index.html");
Related article tutorial sharing: java introductory tutorial
The above is the detailed content of How to implement page jump in java. For more information, please follow other related articles on the PHP Chinese website!