HTTP Streamming for stock watcher applet? -URGENT-


Web tier: servlets, JSP, Web frameworks: HTTP Streamming for stock watcher applet? -URGENT-

  1. Hi,
       I had a problem in HTTP Streamming to track stock quotes in applet. My JSP file thread is continously sending stock information to applet. But applet is not able to receive the data form output Stream. Applet can able to show the data first time, but after two three iterations applet is hanging out. I tested the same JSP through the browser, Browser is able to display the outputstream continously.

    i need some help or suggesions regarding this issue..

    Can anyone help?

  2. The URL connection made from your applet to the JSP only stays opened for one fetch. I don't think there's a way to keep the connection alive. Maybe you can try to have a thread in the applet that polls for data by hitting the JSP every N seconds or so.
  4. Hi Brian,
       Thank you for your suggesion, I implemented the code to get fresh data to applet with a thread by hitting the JSP for every 1 seconds. This idea is good but this may increase the network traffic, that causes server as well as client michenes are slow down.

    Please give me your valueble comments....

    Moreover thank you very much for your help.

  5. What you should be looking at is a publish-subscribe framework to push data continously to client. For example JMS. This would require the use of java-plugins that include Java 2 features. You also need a J2EE app server that supports JMS.