you cannot get OutPutStream in JSP because, If you look at the Java code generated for your JSP, you notice that how "out" implicit objects are created? it is by using response.getOutputStream(). So you will get this run time exception when you try to get OutputStream more than once for same response object.
Instead of JSP, you can forward it to Servlet and do the same in servlet.
In WCS7, I am getting the error below while trying to take printout (pdf file) by clicking on button on one jsp.
[12/26/12 12:51:21:873 EST] 00000036 servlet E com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0068E: Uncaught exception created in one of the service methods of the servlet /error.jsp in application WC_giftreg. Exception created : java.lang.IllegalStateException: SRVE0199E: OutputStream already obtained
Scenario is by clicking on button of one jsp another jsp window opens that shows the content to print but the second jsp (popup jsp) is getting blank and processing for long time and no printout comes.
This issue is coming at production site.
Please help on this.
Thanks in advance.
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop