I have an
applet that attempts to pass two objects to a
servlet: 1. An array list, and 2. A simple
string.
In the servlet, I have code that tries to read both objects (sent from the applet) like this:
inputFromApplet = new ObjectInputStream(request.getInputStream());
classSchedule = (ArrayList) nputFromApplet.readObject();
String whatToDo = (String) inputFromApplet.readObject();
=================
The applet passes the objects to the servlet like this:
utputToServlet = new ObjectOutputStream(
connection.getOutputStream());
outputToServlet.writeObject(list);
outputToServlet.writeObject(preview);
.
.
.
================================
The problem is getting a response back from the servlet. It seems this method isn't working well. I get an error when trying to read the response from the servlet in the applet (though sometimes it seems to work OK).
=======
Can anybody advise me the best way to pass to objects to a servlet?
Thanks much.
-- Mike