Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
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
JavaRanch » Java Forums » Java » Servlets
Reply locked New topic

cannot call getOutputStream() after getWriter()

sreedhar somi

Joined: Jun 27, 2006
Posts: 2
This is the line which throws the exception, and i didn't call
getWriter() at all before this.

OutputStream out = response.getOutputStream();

I am using poi api(servlets) for generating excel sheets.
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

sreedhar somi,

Don't start a new thread to continue a discussion.
Go to the original thread and click the "reply" button to add a new post.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: cannot call getOutputStream() after getWriter()