The difference between client side jump and server side jump in Web development

  • 2021-07-26 06:37:00
  • OfStack

Client Jump: The information in the address bar will change after the jump, and it will change to the address information after the jump

For example: response.sendRedirect();

Jump on the server side: The information in the address bar will not change after jumping

For example: < jsp:forword >

 request.getRequestDisPather("").forword(request, response);

(1). And when using request attribute range, only server-side jump can save request range attributes to jump page; If it is a jump from the client, the request attribute cannot be passed

(2). In addition, if it is a server-side jump, jump is carried out immediately when executing the jump statement; If you are using a client-side jump, the jump will not be performed until the entire page has been executed.

(3). In Servlet, if you want to jump the client, you can directly use SendRedirect () of HttpServletResponse interface, but it should be noted that this jump can only transfer the attributes of session and application, but not the attributes of request

The above is the site to introduce the Web development of the client jump and the server jump difference, I hope to help you, if you have any questions welcome to leave me a message, this site will reply to you in time!

Related articles: