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
What is javabeans component?
What is j2ee component?
How to create object without using the keyword “new” in java?
What is DDP?
How can I be good in java?
Why awt is used in java?
What are the tools in java?
What is java netbeans?
What is setbounds in java?
What is general entity?
What is group?
What is create method?
On which platform j2ee is based?
What is actionform?
What is java listener?