Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
Kevin Jones<br />Author: <a href="http://www.amazon.com/exec/obidos/tg/detail/-/0321136497/jranch-20" target="_blank" rel="nofollow">Servlets and JSP: The J2EE Web Tier</a>
Kevin Jones<br />Author: <a href="http://www.amazon.com/exec/obidos/tg/detail/-/0321136497/jranch-20" target="_blank" rel="nofollow">Servlets and JSP: The J2EE Web Tier</a>
Kevin Jones<br />Author: <a href="http://www.amazon.com/exec/obidos/tg/detail/-/0321136497/jranch-20" target="_blank" rel="nofollow">Servlets and JSP: The J2EE Web Tier</a>
Originally posted by Kevin Jones:
Nope sorry,
The same PrintWriter/ServletOutputStream is available ot both servlets.
The ouput from the second servlet is not suppressed. If you do a RD.include, output from all servlets is sent back to the client
Originally posted by Malli Subramanian Raman:
Hi Kevin,
What you said is correct, if i comment out the out.close() in the first servlet it is working fine.
Regards,
M.S.Raman
Hi everybody, Hi Jones!
Thanks for your reply
But could you please explain clearly about "if you send output and then do the forward the CONTAINER WILL EITHER THROW AN EXCEPTION IF IT HAS COMMITED THE OUT PUT"?. I just don't know what is output HAS COMMITED THE OUT PUT?. if yes you can give me an example code use forward() that it throw IllegalStateException
Thanks
Kevin Jones<br />Author: <a href="http://www.amazon.com/exec/obidos/tg/detail/-/0321136497/jranch-20" target="_blank" rel="nofollow">Servlets and JSP: The J2EE Web Tier</a>
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |