This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
If you are lucky, and you have not committed the response (by overflowing the output buffer), you will get a single line of output: "in 2.jsp"
If the forwarding page was buffered, the buffer is cleared prior to the forward (so say goodbye to "in 1.jsp"). If the page is unbuffered, or you've overflowed the buffer, you will get an IllegalStateException when you try to forward.
You will never see "after forward" because a forward does not return control to the forwarding page. Including a page does though, and does not have the buffering problem either.
And here is the code to forward: [This message has been edited by Mike Curwen (edited October 17, 2001).]