2005 IR Help Posted August 26, 2006 Share Posted August 26, 2006 By: bigInsect - biginsect getOutputStream() has already been called.. 2004-05-26 02:22 I used the jasperreport 0.5.2,but have a problem: I used windows platform and Tomcat container When print the HTML,console message: 2004-05-26 15:15:08 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception java.lang.IllegalStateException: getOutputStream() has already been called for this response at org.apache.catalina.connector.ResponseBase..... By: Chuck Deal - cdeal RE: getOutputStream() has already been called.. 2004-05-26 05:33 This has been covered a while ago, so if I don't give you enough detail, search the forum again. The problem is that on a JSP you can NOT use both the "out" object as well as call "getOutputStream()" you can only use one or the other. You can look at the genereated .java for the JSP to find references to either of those methods. By: bigInsect - biginsect RE: getOutputStream() has already been called.. 2004-05-26 18:03 But why in your jasper's example,have the same error message? +jasperreports -demo -samples -webapp Why? By: Salman Khattak - khattaksd RE: getOutputStream() has already been called.. 2004-06-01 07:57 The jsp example in the webapp is throwing that exception. As mentioned by Chuck, JSP is not the right choice for streaming byte data. However, for some obscure reason you still want to do that, then you will have to live with that exception. You will note that the servlet example is not throwing any exception. To reiterate, when you want to stream byte data, use SERVLETS! There is more detailed discussion on this issue all over the web, if you want to know the 'why' part of this. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now