What is the difference between sendRedirect() and forward()?
in what situations do we have to use send redirect()
instead of forward().
Answer Posted / fateh
the main difference is that forward() do not save the
information while sending to the client but on the other
hand sendRedirect() saves the information while redirecting
to the other page.
Basically, sendRedirect() is used to redirect ot the error
page and forward() is a request dispatcher method to forward
request to the new page. So, if we are talking in this
context sendRedirect() is faster than forward(). According
to he above mentioned concept, forward() is faster than
sendRedirect() but if we are using sendRedirect() to send to
the error page it is faster.
| Is This Answer Correct ? | 3 Yes | 6 No |
Post New Answer View All Answers
Which server is best for java?
Define orm and its working in j2ee?
What are the advantages in the use of spring for application development?
What is jradiobutton in java?
What is java 2 platform, standard edition (j2se)?
to update a batch in a table in jdbc which method of statement object is used
How many java languages are there?
What is source file in java?
What are web technologies in java?
What is java web technologies?
What are the types of j2ee clients?
How long does it take to master java?
What is Document Object Model?
Hi Friends. I want complete technical flow of j2ee project with following technologies. jsp , servlet , Struts , Hibernate , (should follow mvc-2 design pattern) . with DAO ,DTO SERVICE layers .
In DAO we are writting sql queries , how it is possible with creating and closing database connections.