What is difference between Forward() and sendRedirect()
methode?
Answer Posted / sambasiva
Forward()
->Forward Method is available in RequestDispatcher which is
used to forward the request one component to another web
component which are available in same application
->Forward Method will happen completely on the ServerSide
->When u forwarding the request u can send the data from one
component to another component by attaching to request as an
attribute.
sendRedirect()
->This method available in HttpServletResponse which is used
to send the request from one component to another component
which are available in different application
->sendReddirect will happen both on client side or server side
->when u sendredirect the request u can send the data from
one component to another component as a query string.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the use of request dispatcher interface?
How many objects of a servlet is created?
What are the advantages of cookies?
What are different ways for authentication of servlet?
Explain mvc pattern.
Explain servlet events?
How do I use cookies to store session state on the client?
Explain the difference between a web server and a web container?
What methods do you use in servlet - applet communication?
What are common tasks performed by Servlet Container?
How do you load an image in a Servlet?
Why filter is used in servlet?
What is the use of httpservletrequestwrapper and httpservletresponsewrapper?
Can you call a jsp from the servlet?
What do you mean by request dispatcher in servlet? Also explain its methods.