aspose file tools*
The moose likes Struts and the fly likes Error 500: OutputStream already obtained Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Error 500: OutputStream already obtained" Watch "Error 500: OutputStream already obtained" New topic
Author

Error 500: OutputStream already obtained

Inna Rays
Greenhorn

Joined: Mar 16, 2006
Posts: 1
"Error 500: OutputStream already obtained" is happenning after websphere application using tiles and struts is calling a class to create an excel sheet with a null return after flushing the output. What should be done to avoid this error appearing in the Microsoft Excell document where the output is written?

FastExcelCSVPrinter fecp =
new FastExcelCSVPrinter(response.getOutputStream());
if (export(l, fecp))
{
fecp.flush();return null; //return null on success.
}
[ March 16, 2006: Message edited by: Inna Rays ]
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
What this error indicates is that at some point prior to this call, another process has already written to the output steam, and this isn't allowed.

You have to make this call before any other process has a chance to attempt to write to the output stream. One thing you may want to check is that the call to this action should not be part of a tile definition.


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error 500: OutputStream already obtained
 
Similar Threads
Doubt in WhizLab SCWCD 5.0 Mock Test Q.No:41
Mapping servlets
OutputStream already obtained error
getOutputStream() has already been called for this response
PDF File Streaming in a JSP