Communication Applet - Servlet
I have a problem with the connection between an Applet and a Servlet. I know a lot of messages have been posted about this topic but I did not find an answer to my problem.
I want to transmit Objects from an Applet to a Servlet and vice versa. Sending an object from the Servlet to the Applet works fine but the other way does not work. I have no idea why I don't even get an Exception. I installed the Sun Java Plugin for the IE and it does not work. So I tried it without the plugin and it worked. The problem is, that without the plugin creating Frames did not work. So I try to solve the problem with the connection.
Here is the source code:
APPLET: URL servletURL =new URL("http://host:8080/servlet/Servlet");
URLConnection servletConnection = servletURL.openConnection();
servletConnection.setDoOutput(true);
servletConnection.setDoInput(false);
servletConnection.setUseCaches(false);
servletConnection.setDefaultUseCaches(false);
servletConnection.setRequestProperty("Content-type","application/x-java-serialized-object");
OutputStream os = servletConnection.getOutputStream();
output =new ObjectOutputStream(os);
Object myObject=new Object();
output.writeObject(myObject);
output.flush();
output.close();
SERVLET: ObjectInputStream input =new ObjectInputStream(request.getInputStream());
Object receivedObject;
receivedObject = input.readObject();
input.close();
Thank you for in advance your help.

