difference between forward and sendredirect
Answer Posted / neeraj_passion2001
FORWARD-->
1. THE REQUEST AND RESPONSE OBJECT REMAIN SAME.
2. CONTROL DIRECTLY GOES TO REQUESTED PAGE AT THE POINT
WHERE FORWARD IS CALLED.
3. REQUEST DISPATCHER IS NEEDED.
SEND REDIRECT:--->
1.NEW REQUEST AND RESPONSE IS GENERATED IN CASE THIS CASE.
2.IN THIS CASE FIRST CONTROL GOES TO CLIENT(BROWSER) AND
THEN TO REQUESTED PAGE.
3.JUST RESPONSE OBJECT IS NEEDED.
| Is This Answer Correct ? | 33 Yes | 2 No |
Post New Answer View All Answers
Explain the lifecycle of a servlet?
Why doesn’t a servlet include main()? How does it work?
Explain the features are in servlet 3?
What is a servlet context object?
Define the servlet mapping.
Why is http protocol called as a stateless protocol?
When servlet is loaded?
How we can call a jsp from the servlet?
What is cookie? Why is cookie used?
Explain the difference between a web server and a web container?
What are the disadvantages of storing session state in cookies?
What is a deployment descriptor?
What is the use of servletconfig interface?
What are the difference between session and cookies in servlet? Explain
How does java thread pool work?