gudii9
asked on
servlet sendRedirect
Hi,
I am reading about servlet sendRedirect as below
http://www.javatpoint.com/sendRedirect%28%29-method
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
https://www.google.co.in/#q=sai
what is meaing of '#q '
I have not clearly understood the differences between redirect, forward.Advantages, disadvantage, practical uses of each of them.
please advise
Any links resources ideas highly appreciated. Thanks in advance
I am reading about servlet sendRedirect as below
http://www.javatpoint.com/sendRedirect%28%29-method
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("servlet 2").forwar d(request, response); Example: response.sendRedirect("ser vlet2");
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
https://www.google.co.in/#q=sai
what is meaing of '#q '
I have not clearly understood the differences between redirect, forward.Advantages, disadvantage, practical uses of each of them.
please advise
Any links resources ideas highly appreciated. Thanks in advance
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.