What is the difference between and sendRedirect? - Just Crack Interview

What is the difference between and sendRedirect?

What is the difference between  and 
sendRedirect?

Ques:- What is the difference between and sendRedirect?
2 4867

2 Answers on this Question

  1. Forwrd :: when we invoke forward the request is sent to the
    another resource on the server without the client being
    inform that difference resource is going to process that
    request.
    SendRedirect :: when we invoke sendRedirect, It causes the
    web container to return to the brouser that means new URL
    should be requested.
    SendRedirecr takes extra round trip
    Forward is fater than sendRedirect

  2. Using you can forward the request and
    response object to the concern URL. Where as in
    sendRedirect, it will not carry the request and response
    object details.

Leave a Reply

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

Scroll to top