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

Answer Posted / ajay

sendRedirect() means it's client side redirect at that time
new parameters can be added.(i.e HttpRequest, HttpResponse)

forward() meand it's server side redirect at that time same
parameters can be used.


forward() can be used forwarding the request from one
servlet to jsp.(i.e with in the container).

redirect() can be used redirecting the one jsp to another
jsp(i.e different containers).

Is This Answer Correct ?    56 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between java and core java?

485


Is class a data type in java?

492


What is a plugin in java?

475


Explain j2ee architecture.

601


What is build tool in java?

496






What is java api for xml processing (jaxp)?

556


What is actionerrors?

528


What is a java developer?

475


What is actionform?

553


What are the technologies a java developer must know?

474


What are the differences between Ear, Jar and War files? Under what circumstances should we use each one?

527


What is java full stack developer?

489


What is repaint in java?

504


What is home handle?

529


What is a java application client?

529