see below.

John Zerbe - Mellon Bank
IM&R - Middleware Team
Phone:  412-234-1048   E-Mail:[EMAIL PROTECTED]



> -----Original Message-----
> From: Gustav Trede [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, November 22, 1999 5:39 AM
> To:   [EMAIL PROTECTED]
> Subject:      java.net.ProtocolException: Cannot write output after
> reading input
>
> hello,
>
> Can enyone help me on this ?? please.
>
> Senario is:
> i send ordnernumber to servlet.
> servlet sends me the orders.
> I tell the servlet that i succesfully recieved and saved orders on hd.
> here i get exception java.net.ProtocolException: Cannot write
> output after reading input
>
> I want to do all this in the same session.
> communication is done with Objectin/outputstreams like:
> ObjectInputStream in = new ObjectInputStream(new
> GZIPInputStream((urlConn.getInputStream())));
>
>
> code in client side is:
>
> out.writeObject(ordernumbers);  //send ordernumbers to servlet
> out.flush();
> out.close();
>
>  ObjectInputStream in = new ObjectInputStream(new
> GZIPInputStream((urlConn.getInputStream())));
> Vector orders  = (Vector) in.readObject(); // i get the new orders
> in.close();
>
> I save orders to local hd .
>
        [Zerbe John W]  I believe that at this point, you have sent your
http request and gotten a good response.
                You then need to create a new urlConn to invoke your servlet
again (or different servlet) to send your "OK" message.

> out = new ObjectOutputStream(new GZIPOutputStream
> (urlConn.getOutputStream()));
> out.writeBoolean(true);  // i tell the servlet its ok to erase the orders
> on serverside. Here i get my exception... how should i do ??
>
> regards
>  Gustav Trede
>  Swedish Chemistry
>
> __________________________________________________________________________
> _
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to