| Author |
jsp:forward Vs requestDispatcher.forward()
|
Sagar kanchi
Ranch Hand
Joined: Oct 07, 2005
Posts: 50
|
|
Hi, While I was going through the SCWCD hints provided in javaranch website I came across the following stmt. A <jsp:forward> effectively terminates the current page. Nothing before the <jsp:forward> or after the <jsp:forward> is written to the response! It is not the same when using a requestDispatcher.forward(). Can anybody explain how both forwards are different and in what aspects? If it is already explained can somebody guide me to the URL where it is already explained. Thnx in advance
|
Where there are more wonders there is less knowledge
|
 |
Joe Harry
Ranch Hand
Joined: Sep 26, 2006
Posts: 8795
|
|
|
The only difference between the two is that with <jsp:forward>, your control comes out of the _jspservice() method. But it is not the case with RequestDispatcher.forward() where your control is still within the service() method.
|
SCJP 1.4, SCWCD 1.4 - Hints for you, SCBCD Hints - Demnachst, SCDJWS - Auch Demnachst
Did a rm -R / to find out that I lost my entire Linux installation!
|
 |
 |
|
|
subject: jsp:forward Vs requestDispatcher.forward()
|
|
|