I am reading about servlet sendRedirect as below
orward() method sendRedirect() method
The forward() method works at server side. The sendRedirect() method works at client side.
It sends the same request and response objects to another servlet. It always sends a new request.
It can work within the server only. It can be used within and outside the server.
Example: request.getRequestDispacher("servlet2").forward(request,response); Example: response.sendRedirect("servlet2");
I ran this example by creating fresh dynamic web project and copying src and web.xml, index.html files.
I redirected to google page as below
what is meaing of '#q '
I have not clearly understood the differences between redirect, forward.Advantages, disadvantage, practical uses of each of them.
Any links resources ideas highly appreciated. Thanks in advance