Hi everyone.
I have an Applet that makes a request to a Servlet. On the servlet it's using the PrintWriter to write the response back to Applet:
out.println("Field1|Field2|Field3|Field4|Field5......|Field10");
There are about 15000 records, so the out.println() gets executed about 15000 times.
Problem is that when the Applet gets the response from Servlet it takes about 15 minutes to process the records. I placed System.out.println's and processing is paused at around 5000, then after 15 minutes it continues processing and then its done.
Has anyone faced a similar problem? The servlet takes about 2 seconds to execute. So seems that the browser/Applet is too slow to process the records.
This is the Applet code. Sometimes it just stops on the first System.out and sometimes stops on the second System.out.
while ((line = in.readLine()) != null) {
System.out.println("Reading from stream....");
datavector.add(line);
System.out.println("Vector size="+datavector.size()+" Line added="+line);
}
Any ideas appreciated.
Thanks.