File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Applets and the fly likes Servlet push to Applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Servlet push to Applet" Watch "Servlet push to Applet" New topic

Servlet push to Applet

Javad Rashidi
Ranch Hand

Joined: Feb 13, 2011
Posts: 34

How to create servlet that push data to applet? or how to implement server pushing between servlet and applet?
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

Can't really be done using a Servlet (unless you implemented your own protocol and Servlet implementation I suppose). Normal HTTP Servlets use HTTP which does not support push. You can use technologies like Comet to get push like behaviour with HTTP, but since you are using an Applet this is unnecessary. You need to use socket programming rather than Servlets.

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Javad Rashidi
Ranch Hand

Joined: Feb 13, 2011
Posts: 34

Hi and tanx for your replay Paul.
can i use RMI instead socket programming?
I agree. Here's the link:
subject: Servlet push to Applet
It's not a secret anymore!