What is difference between Forward() and sendRedirect()
methode?
Answer Posted / farhaananwar
Foward action is done at server site without interference of
web browser even the old URL is not changed whereas request
is forwarded to new resource hence forward action is faster
than redirect action. when forward operation is performed
request attributes and session attributes persists.
In case of redirection. servlet container sends the
response to clien web browser by setting status to
HttpServletResponse.SC_TEMPORARY_REDIRECT and location
header
to the new URL address where browser will have to redirect
new request automattically without interference of client.
when browser redirect new request to resource, the URL in
web browser changed. This proccess is slower than forward
because server send response to browser telling that
resource requested is moved temporary to other resource and
need redirction and then browser take action. The request
paramters are persist in new redirect request.
Is This Answer Correct ? | 1 Yes | 3 No |
Post New Answer View All Answers
What’s the difference between genericservlet and httpservlet?
Name the different ways of session tracking.
What is the difference between get and post methods?
hi actully i hav form columns with origin and destination names .as like as i need to create one more column with name amount. my requirement is when i select origin and destination columns automatically i need to get amount from database.how can i. please tel me with relative code
Explain servlet events?
Can you create a deadlock condition on a servlet?
How does java thread pool work?
How do cookies work in servlets?
What do you understand by mime type?
What are the differences between servlet context vs servlet config?
Where do you define dispatcherservlet?
What is SingleThreadModel interface?
Hi frnd can i any one kindly can post for me portlet,hibernate and spring example application and with flow explantion configuration using Jdeveloper.and related links ar tutorials kindly please send me .its urgent for me .thanks in advance...........else can any one send to kondaiah.goddeti@gmail.com
What do you mean by singlethreadmodel interface?
What are the two important api's in for servlets?