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
How can the session in servlet can be destroyed?
What is a servlet engine?
How to get the current httpsession object?
What do you mean by request dispatcher in servlet? Also explain its methods.
When servlet is loaded?
Can we use threads in Servlets?
What are different methods of session management in servlets?
What do you mean by mime type?
What is a servlet?
List the Different types of servlet?
What is a server side include (ssi)
Whether thread can be used in servlets?
Why servlet is faster than jsp?
What is servlet lazy loading?
Name the different ways of session tracking.