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 different ways for servlet authentication?
How to upload a file to the server using servlet?
What is a server side include (ssi)
What is MIME Type?
what is the different between a servlet and a cgi? Why do you go for servlet rather than cgi?
Which are the different ways you can communicate between servlets?
What is the requirement of servlet config and servlet context implemented and how are they implemented?
Can you use javascript in servlets?
What is ServletConfig object?
What is the GenericServlet class?
What is difference between jsp and servlet?
What is the difference between get and post methods?
What are the steps that are involved in using the httpservlet class?
How do we translate jsp?
Is servlet a controller?