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 are the functions of an intercepting filter?
Explain the different ways for servlet authentication?
How do you define a servlet?
Does servlet have main method?
What is meant by a web application
What is a deployment descriptor?
What are the steps involved in placing a servlet within a package?
What is cookies in servlet with example?
How to rectify errors in java servlet while compilation?
What are the advantages of servlets over traditional cgi?
Can we override servlet service method?
Why filter is used in servlet?
What is difference between cookies and httpsession?
List out difference between a JavaBean from a Servlet?
Is it good idea to create servlet constructor?