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

What is the latest framework in java?

0 Answers  


Diffrence between arraylist and hashmap

3 Answers   Oracle,


Is java safe to download?

0 Answers  


to update a batch in a table in jdbc which method of statement object is used

0 Answers  


What is core java and j2ee?

0 Answers  






What is 2 stands for in j2ee?

0 Answers  


Is java gui dead?

0 Answers  


Is java is fully object oriented?

0 Answers  


what is transaction?what are the differenr type of transactions

1 Answers   HCL,


Write a program to display numeric value in reverse order. Ex: I have given a number like 7584, It should display in reverse order like 4857.

6 Answers  


What is j2ee module?

0 Answers  


Which server is best for java?

0 Answers  


Categories