What is difference between Forward() and sendRedirect()
methode?

Answer Posted / mohan

I want to add one more point to the above answers, that is,
in case of Forward() the attributes related to the request
will remain same, as it is inside the server, whereas
incase of senRedirect(), it results in a new request so the
previous attributes of the request will be lost...

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we get PrintWriter and ServletOutputStream both in a servlet?

661


Can filter be used as request or response?

546


What is the element?

590


What is a web application and what is it’s directory structure?

586


When a client request is sent to the servlet container, how does the container choose which servlet to invoke?

577






What is difference between ServletResponse sendRedirect() and RequestDispatcher forward() method?

622


what is multiple server?

1762


What are the functions of an intercepting filter?

490


Which HTTP method is non-idempotent?

618


Is that servlet is pure java object or not?

644


What are the differences between servlet context vs servlet config?

582


Explain the difference between servletconfig and servletcontext in servlet?

577


Can we use the constructor, instead of init(), to initialize servlet?

586


What is servlet in web technology?

577


What is called servlet mapping?

558