Answer Posted / aru
forward is server side redirect and sendRedirect is client
side redirect. When you invoke a forward request, the
request is sent to another resource on the server, without
the client being informed that a different resource is going
to process the request. This process occurs completely with
in the web container And then returns to the calling method.
When a sendRedirect method is invoked, it causes the web
container to 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. Client can disable
sendRedirect.
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What are the uses of servlets?
Why is servlet used?
What is difference between PrintWriter and ServletOutputStream?
What is session?
What is called a session?
How can you run a servlet program?
What is called Scriptlet?
What is meant by session? Tell me something about httpsession class?
How we can create war file in servlet?
Explain the war file?
What is meant by servlet? What are the parameters of the service method?
What are common tasks performed by Servlet Container?
Explain the different ways for servlet authentication?
What is the difference between the servlets and cgi programs?
What are important features of Servlet 3?