What is the difference between sendRedirect() and forward()?
in what situations do we have to use send redirect()
instead of forward().

Answers were Sorted based on User's Feedback



What is the difference between sendRedirect() and forward()? in what situations do we have to use s..

Answer / fateh

the main difference is that forward() do not save the
information while sending to the client but on the other
hand sendRedirect() saves the information while redirecting
to the other page.

Basically, sendRedirect() is used to redirect ot the error
page and forward() is a request dispatcher method to forward
request to the new page. So, if we are talking in this
context sendRedirect() is faster than forward(). According
to he above mentioned concept, forward() is faster than
sendRedirect() but if we are using sendRedirect() to send to
the error page it is faster.

Is This Answer Correct ?    3 Yes 6 No

What is the difference between sendRedirect() and forward()? in what situations do we have to use s..

Answer / sateesh.b

sendRedirect() can be used to send a request with in the
server or in other server.
forward() can be used to send request in the same server.

Is This Answer Correct ?    8 Yes 14 No

What is the difference between sendRedirect() and forward()? in what situations do we have to use s..

Answer / maa

yyyy ddddd ggg

Is This Answer Correct ?    2 Yes 14 No

Post New Answer

More J2EE Interview Questions

How do you run a java program?

0 Answers  


What is j2ee stand for?

0 Answers  


Why is java considered dynamic?

0 Answers  


where exactly the servlets and jsp's are stored?

6 Answers   CG-VAK, JHJ, TCS,


What is java api for xml-based rpc (jax-rpc)?

0 Answers  


How java is used in web applications?

0 Answers  


I am newbie in J2EE & looking for strong basic behind each concept as, Why do we use private access specifier before each variable of type property bcoz ultimately to access it outside the class we use public method as getter & setter ? If we use getter & setter to access it outside the class so better we make variable as public so that it is easily available outside of the class... Please guide me why do we use as private ????

3 Answers   CTS,


What is container-managed sign-on?

0 Answers  


what is direct link to download swing ebook,applet,ejb,core java

0 Answers  


what is the difference between servlets and jsp?

2 Answers   Cegonsoft,


What is archiving?

0 Answers  


What is java ee server?

0 Answers  


Categories