Applet Servlet Connection
796764Jul 6 2009 — edited Jul 6 2009I have some problems with applet-servlet connection.
In my applet, after making a connection to the servlet, I have sth like:
String s1 = (String)inputFromServlet.readObject();
System.out.println(s1);
String s2 = (String)inputFromServlet.readObject();
System.out.println(s2);
And in my servlet:
out.writeObject("string 1");
/* do sth here */
out.writeObject("string 2");
The problem is that the applet only receives from servlet after it finishes writing the second string (It displays both string at the same time) . Is there anyway to make the applet receive the 1st string right after the servlet writes it without making another connection?