Try resetting the stream before each write, using
ObjectOutputStream.reset().

-----Original Message-----
From: Tim Fleming [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 11, 1999 11:52 PM
To: [EMAIL PROTECTED]
Subject: Servlet-Applet Communication


I have an applet that requests data objects from a servlet via object
serialization over http.  Once the request is made, the applet and servlet
keep their respective ObjectStreams open indefinitely so the servlet can
send periodic updates.  The objects from the servlet are always the same
class.

The applet receives the first object ok.  When the servlet sends the next
one the applet reports "EOF Exception".  The third and subsequent objects
report "java.io.StreamCorruptedException: InputStream does not contain a
serialized object".

Any ideas where the problem may be?

Thanks in advance.


---------------------------------------------------
Tim Fleming · Enterprise Technologist · ACI
Ph (415) 289-3933 · Fax (415) 332-4818
---------------------------------------------------

___________________________________________________________________________
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