Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Cannot write output after reading input

843841Feb 15 2006 — edited Feb 15 2006
Hi,

I am using HttpURLConnection object, and I am reading a fine and setting to getOutputStream for sending an XML file as an input. But I am getting "java.net.ProtocolException: Cannot write output after reading input. at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)

at sun.net.www.protocol.https.URLConncetionImpl.getOutputStream(Unknown Source) at .......................

Can any body suggest me how to overcome this Exception. If possible give me sample code.

Thanks,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 15 2006
Added on Feb 15 2006
3 comments
2,525 views