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

Answer Posted / bindhu solomon

When we use forward, then servlet container forwards all
request to the target page. but in the case sendRedirect,
container makes a new request to the target Page.
So in forward , url link doesn't change but in sendRedirect
url line change . Because container makes a new request,
sendRedirect is much slower than forward.

If a target page has no relation with current
page , then we can use sendRedirect(I think so....)

Is This Answer Correct ?    35 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the concept of connection pooling?

545


What is java awt event?

495


How do I become an expert in java?

479


What does the web module contain?

566


What do you mean by the deployment descriptor?

511






What is architecture neutral in java?

481


What is java ee technologies?

467


Why is java important for internet?

462


Is string an object in java?

456


Who generates bytecode in java?

508


What are the components of j2ee applications?

599


What are java front end tools?

507


Which is latest technology in java?

486


What is the mvc on struts?

514


Is java a high level language?

494