Technology Exchange Group: 233513714Forwarding and redirectionWhen starting Java EE, the two concepts of forwarding (forward) and redirection (redirect) may not be clear. This article first through the code instance and the running result picture
1. Accessing resourcesuse the Forward method to redirect only one resource in the same Web application. The Sendredirect method allows you to redirect to any URL. 2.request.getThe "/uu" in the forward code represents the relative path to the Web App.
You can use the Sendredirect () method of the HttpServletResponse object if you simply want to implement a simple page jump and do not need to pass the request object.
Eg:response.sendRedirect ("web address");
If you want to implement a page jump
First two pictures, easy to understand:As you can see, when redirected, the server re-sends a response command to the viewer, allowing the viewer to send a request again to Url2 to get URL2 resourcesWhen the request is forwarded, similar to the
Lin Chuan Zhong Hu Changsheng This is my translation of the NAT settings provided by VirtualBox. I am not an English major. Not complete, to be continued. Reprinted my article. Please indicate the source. Thank you very much. 1. Network Address
After a long time, I forgot the basics. Let's take a look at it today. Hehah... learn new things with a warm understanding !!!
1. requestdispatcher. Forward ()-forwardIs used on the server. When forward () is used, the servlet engine transmits
After a long time, I forgot the basics. Let's take a look at it today. Hehah... learn new things with a warm understanding !!!
1. RequestDispatcher. forward ()-forwardIs used on the server. When forward () is used, the Servlet engine transmits the
For a long time did not look, and the foundation just to forget. Have a good look again today. Oh, oh ... Warm to know new AH!!!
1.requestdispatcher.forward ()-Forwardingis on the server side, when using forward (), the Servlet engine passes HTTP
Reproduced from: http://www.cnblogs.com/hellofei/archive/2010/02/02/1662070.html
The difference between JSP forwarding and redirection
Http://blog.csdn.net/CYHJRX/archive/2009/02/26/3938252.aspx
For a long time did not look, and the foundation
Previous wordsThis article will detail the entire process from input URL to page loadOverviewThe skeleton flow from the input URL to the page load is as follows:1. Browser Building HTTP REQUEST requests2. Network Transmission3. Server Building HTTP
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.