what happens if we wont use destroy()?

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


Please Help Members By Posting Answers For Below Questions

What are the uses of servlets?

624


Why is servlet used?

686


What is difference between PrintWriter and ServletOutputStream?

776


What is session?

643


What is called a session?

625






How can you run a servlet program?

601


What is called Scriptlet?

564


What is meant by session? Tell me something about httpsession class?

605


How we can create war file in servlet?

663


Explain the war file?

612


What is meant by servlet? What are the parameters of the service method?

581


What are common tasks performed by Servlet Container?

771


Explain the different ways for servlet authentication?

534


What is the difference between the servlets and cgi programs?

551


What are important features of Servlet 3?

599