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 is the purpose of dispatcherservlet properties?
Explain the lifecycle of a servlet?
If some new data has entered the database, explain how can a servlet refresh automatically?
What is webservlet?
What is servlet instance?
Explain the different ways for servlet authentication?
Which httpsession object is used to view and manipulate information about a session?
How many objects of a servlet is created?
Why doesn’t a servlet include main()? How does it work?
how the HTML data stored in web server?
What is meant by Servlet? What are the parameters of service method?
What is the need of session tracking in web application?
What is the difference in between the httpservlet and generic servlet?
How do you configure a centralized error handler in servlets?
Explain the architechure of a servlet?