Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question From ScwcdHints..?

 
Manwatkar Vaibhav
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From ScwcdHints :

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().


Does it mean, if I use requestdispatcher to forward request to another web component, the output before calling next component or after calling next component will be displayed as output..?

Clarify me please..
 
Mirko Bonasorte
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
from the specs,

a jsp : forward effectively terminates the execution of the current page


This means that if you do something other than printing after forwarding (for example, committing data to the database), it is not executed.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic