My applet is sending a request to a servlet (using tomcat 3.1 + Apache).

Jens Dibbern

[There's no real problem with "pinging" from the applet to the servlet every 30 seconds. The load per request is still pretty low. Keep-alive / server-push is an OK solution, but it sounds like it's more trouble than it's worth. But flush() should still work -- maybe there's a bug in your servlet engine? -Alex]

A good solution for long running transactions in servlets is to use a Thread for it and store the thread in the Session. After starting the Thread you can response a "wait" message and send following requests from the applet asking for the result every 30 seconds (or whatever interval you like). The servlet should respond with wait messages as long as the Thread is alive and after that respond with your results.

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact