Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Applet Servlet Connection

796764Jul 6 2009 — edited Jul 6 2009
I 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?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 3 2009
Added on Jul 6 2009
2 comments
73 views