What is the difference in the URL seen by the client when using forward() vs sendRedirect() in servlets?

  • The client sees the new URL in both cases
  • The client sees the new URL with forward() and the original URL with sendRedirect()
  • The client sees the original URL in both cases
  • The client sees the original URL with forward() and the new URL with sendRedirect()
The difference lies in what the client sees: with forward(), the client sees the original URL, while with sendRedirect(), the client sees the new URL.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *