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 differences between the servletconfig interface and the servletcontext interface?
What do you mean by annotations in servlet?
how the HTML data stored in web server?
What is lazy loading and what is Generic Servlet Class?
What are the life cycle methods of a servlet?
How can the session in servlet can be destroyed?
Can we fetch the attributes related to a servlet on a different servlet?
What is pure servlet?
Explain the lifecycle of a servlet?
Why are http servlets used in programming?
What is dispatcher servlet?
What do you mean by deployment descriptor?
What is the capacity the doget can send to the server?
How httpservlet is different from the genericservlet?
How can we upload the file to the server using servlet?