This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Servlets and the fly likes how to avoid response.getOutputStream() exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to avoid response.getOutputStream() exception" Watch "how to avoid response.getOutputStream() exception" New topic
Author

how to avoid response.getOutputStream() exception

kotha vijaybabu
Ranch Hand

Joined: Jan 28, 2006
Posts: 77
hai

iam getting response.getOutputStream() has been already called exception
in my action class.
but i didnot called that in my project
that is coming from other code which is not accessible for me

so my question is how can i avoid that exception
it is creating much problem in my code while updating database

thanks in advance

vijay
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6662
    
    5

Why do you need to get the output stream to update the database ? Can you post code here ?


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Prabhu Venkatachalam
Ranch Hand

Joined: Nov 16, 2005
Posts: 502

response.getOutputStream() is used to reply raw bytes to client. How can It be realted with DB?

outputStream can be get only once for response. If you try to get second time you will get exception. You cannot avoid it.

Can you explain little bit about your problem?


Prabhu Venkatachalam<br />SCJP 1.4,SCWCD 1.4<br />prabhu.venkatachalam@gmail.com
 
jQuery in Action, 2nd edition
 
subject: how to avoid response.getOutputStream() exception