]; 2. Through front-end js, such as [window.location.href = "index.html" 】."/> ]; 2. Through front-end js, such as [window.location.href = "index.html" 】.">

Home  >  Article  >  Java  >  How to implement page jump in java

How to implement page jump in java

王林
王林Original
2020-02-04 15:48:064672browse

How to implement page jump in java

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn