tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Goss <mg...@rtci.com>
Subject Re: About Servlet-Applet Communication
Date Mon, 09 Oct 2000 17:31:17 GMT
what you want to do is use the output stream from the response as an
object stream like this:
<on the servlet side>
Object myobject = new Object();
java.io.ObjectOutputStream os = new
ObjectOutputStream(resp.getOutputStream());
os.writeObject(myobject);
</on the servlet side>
<on the applet side>
ObjectInputStream ois = new ObjectInputStream(conn.getInputStream());
Object myobject =  (Object) ois.readObject();
ois.close();
</on the applet side>
That works for me...
Matt Goss

Mime
View raw message