Forwarding and redirection
I used a lot in writing servlet redirection and forwarding. I didn't quite understand the difference at the beginning, but it was important, so I had to memorize it. After many times of learning and exercises, I finally got a little understanding. If there is something wrong, everyone will study together.
ForwardingFor example, if there are three people A, B, and C, A will not ask B if there are any questions, and B will not ask B, but B will ask C and then tell. However, A does not know that B has asked C, but B has explained the question to himself.
RedirectionFor example, if there are three people A, B, and C, if A does not have A question, ask B. If B does not, directly tell A and C to answer this question, let A ask C. Therefore, A ran to ask C.
Difference between forwarding and redirection:
1. Forwarding is a server action, while redirection is a request sent from the client to the server again.
2. Duplicate refresh issues and data transmission, but not redirection. However, redirection can be redirected to other applications.
3. For the client, forwarding is a request that is processed multiple times, and redirection is a request of two times.
4. the URL of the browser address bar is the same during forwarding, while the address bar of the browser may be different during redirection.
5. Fast Forwarding and slow redirection