What's the differences between sendRedirect and forward?

what's the differences between sendRedirect and forward? when to use which? which has better performance?Thank youCal
[139 byte] By [ringo208a] at [2007-9-19]
# 1

Forward will use the same request/response and give them to the component indicated in your forward message. It is just a pass off mechanism. It will not update the url indicator on the browser, however, to the target of your forward message.

sendRedirect goes back to the browser (read more expensive network traffic), gets a new request/response object set, and updates the http header information so that the browser reflects the target of the sendRedirect.

Decisions should be made on an individual basis based on the above info.

jwyatta at 2007-7-8 > top of java,Enterprise & Remote Computing,Web Tier APIs...
# 2
For a much longer explanation: http://www.fawcette.com/javapro/2002_03/online/online_eprods/servlets_03_19/
DrClapa at 2007-7-8 > top of java,Enterprise & Remote Computing,Web Tier APIs...
# 3
thank you very much. It's more clear now, thank youCal
ringo208a at 2007-7-8 > top of java,Enterprise & Remote Computing,Web Tier APIs...