Forward and Redirect in Servlet
Advertisements
Difference Between Forward and Redirect in Servlet
Forward | Redirect |
---|---|
In forwarding, the destination resource must be java enabled resource only. | In redirection, the destination resource can be either java or non-java resource also. |
In forwarding, both source and destination resource must run within the same server. It is not possible to communicate across the server. | In redirection, it is possible to communicate, either within the serve or even across the server. |
In forwarding, both the data and control are forwarded to destination (by default). | In redirection, only control is redirected, but not the data (by default). |
Google Advertisment