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 inter-servlet communication?
What is the purpose of inter-servlet communication?
What is Servlets and explain the advantages of Servlet life cycle?
What are the ways to handle multi-threading in servlets?
Difference between doget and dopost?
Describe the phases of servlet lifecycle?
List some life cycle methods of a servlet.
Why are http servlets used in programming?
What is the use of welcome-file-list?
Explain the servlet filter.
What is servlet initializer?
Whether thread can be used in servlets?
How can the session in servlet be destroyed?
What are the new features added to servlet 2.5?
How to notify an object in session when session is invalidated or timed-out?