• Post Reply Bookmark Topic Watch Topic
  • New Topic

Doubt in <jsp:forward />  RSS feed

 
Sai Surya
Ranch Hand
Posts: 463
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

HFSJ mentions that if we commit the response before the forward the client will be sent whatever was flushed and the forward won't happen.
In this case, how to make a successful forward?

 
Vijitha Kumara
Bartender
Posts: 3974
24
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should either forward the request to some other component or response yourself. If you try to forward after commit the response is already gone, so the forward will have no effect on the response (though you'll get an fat IllegalStateException ).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!