What is difference between Forward() and sendRedirect()
methode?
Answer Posted / shakir khan
The RequestDispatcher forward and include methods are
internal to a servlet container and does not affect the
public url of the webresource.
forward() are excute on the server side.
when a forward() is invoked,the request is sent to another
resource on the server without the client being inform that
a different resource is going to process the request.This
occurs completely with in the webcontainer.
sendRedirect() excutes on the client side.
When a sendRedirect()is invoked,it causes the webcontainer
return to the browser,indicating that a new url should be
requested because the browser issues a completely new
request,any object that are stored as request attributes
before the redirect occurs will be lost.
This extra round trip,a redirect is slower than forward.
Is This Answer Correct ? | 45 Yes | 3 No |
Post New Answer View All Answers
What do you mean by annotations in servlet?
How can I send user authentication information while making URL Connection?
how to link html file to sevlet file.one name is textbox,c&c++ is cheakbox,bc&mca is radio button and one submit buttonis ok why in this programme use in servelt file
What is the difference between the include() and forward() methods?
what do you understand by url rewriting?
What is the effective way to make sure all the servlets are accessible only when user has a valid session?
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
Which event is fired at the time of session creation and destroy?
What is the GenericServlet class?
Which event is fired at the time of project deployment and undeployment?
how the HTML data stored in web server?
What is java servlet session?
Why are http servlets used in programming?
Why the concept of single thread model interface is used?
How does Cookies work in Servlets?