This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes cannot call getoutputstream( ) after getwriter( ) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "cannot call getoutputstream( ) after getwriter( )" Watch "cannot call getoutputstream( ) after getwriter( )" New topic
Author

cannot call getoutputstream( ) after getwriter( )

sreedhar somi
Greenhorn

Joined: Jun 27, 2006
Posts: 2
I am using poi api for generating excel sheets.iam creating workbook and sheets in my code.for writing the output iam using outputstream().
response.getoutputstream()
build and deployment successful. but when i ran the servlet on browser iam getting the following error.
cannot call getoutputstream() after getwriter()

is there any way to resolve this issue.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Yes, call one or the other.
The HTTP protocol allows one response per request.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: cannot call getoutputstream( ) after getwriter( )
 
Similar Threads
probelms with response.getOutputStream
getWriter()
cannot call getOutputStream() after getWriter()
setContentType and getOutputStream
Good question