sendRedirect() method of HttpServletResponse interface - Servlets

Q.  The sendRedirect() method of HttpServletResponse interface can be used to redirect response to another resource, it may be servlet, jsp or html file.
- Published on 22 Jul 15

a. True
b. False

ANSWER: True
 

    Discussion

  • Nirja Shah   -Posted on 15 Dec 15
    - The above statement is true.

    - The sendRedirect() method of HttpServletResponse interface can be used to redirect response to another resource, it may be servlet, jsp or html file.

    - The relative and absolute URL both are accepted.
    Its working is done at the client side because it uses the url bar of the browser to make another request. So, it can work inside and outside the server.

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)