Home > Java > javaTutorial > body text

How to implement page jump in java

王林
Release: 2020-02-04 15:48:06
Original
4676 people have browsed it

How to implement page jump in java

1. Page tag

<a href="index.html">
Copy after login

2. Front-end js

(recommended video tutorial: java video tutorial)

window.location.href = "index.html"
Copy after login

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);
Copy after login

4. Page redirection

Tell the front end to resend the request. The two requests are separate.

response.sendRedirect("index.html");
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!