What is the difference between sendRedirect() and forward()?
in what situations do we have to use send redirect()
instead of forward().
Answer Posted / vinit sharma
Hello i am vinit and according to me,
Both methods are use to transfer form one web component to
another web component.
In case of forward () the same request (that have client
information) is passed from server side to the another page
(this another page should be in the same container (Web
Server)), due to URL remains same.
While in sendRedirect () a new request (due to
loss the previous request information) is generated from
client side to another page (this another page can be in
the same OR in different container (Web Server)), due to
URL becomes change.
| Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
What is awt package in java?
What is the preferred size of a component in java?
Define orm and its working in j2ee?
What is build file?
What is callback methods Component methods called by the container to notify the component of important events in its life cycle?
What is java naming and directory service?
Is java a web technology?
What is Connector architecture?
what is interface in java ?can you explain with simple example?and what is the difference between abstract and interface?
What are the four types of J2EE modules?
Is j2ee and jee same?
What is a java ee container?
What is the latest technology used in java?
What is container-managed transaction?
What is commit?