The theory says that
A request dispatch happens on the server, while a redirect happens on
the client.
Aren't that the both methods used in the servlet? Then both should happen at server side. Right?
Or did i misunderstood what is client/server side?
Please give me clear explanation with some examples if you can.
Thank you.
Does sendRedirect() happens at client side or at the server side?
1k views Asked by Dil. At
2
redirect is a signal that server sends to the client with the means of HTTP response header.
HTTP
302
code is used along with alocation
header in the response from server. When client receives 302, it then uses URI specified by the Location header to fire a new request.So redirection is initiated by the server but actual redirection happens on the client side, because client is responsible to send the new request.