• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet communicating with AppletS

 
ali sookun
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi there,
my problem is about applets communicating with a servlet. i have a system whereby a servlet must identify applets in order to send a message to them.
the system is like a 'versioning' system whereby when a user makes a change in a file via an applet the servlet must be able to identify the other applet.
it involves many applets but only on servlet.

thanks you in advance
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by "other applet"? Are there multiple applets communicating with the servlet, and the servlet should notify all of them about a change made by any one particular applet?
 
ali sookun
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes, its like a client-server architecture..whereby the clients are the applets and the server is the servlet...
Once an applet make a change on a particular shared file..then the servlet notify the other applets.

Thanks in advance,
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If HTTP is the only communication mechanism available, then the servlet will have to wait until each applet makes the next request. Kind of like asking "Hey servlet, what's new?" Then any relevant data can be part of the response. The applet could be polling the servlet every 60 seconds or so (the interval depends on your requirements).
 
Vinoth Thirunavukarasu
Ranch Hand
Posts: 164
Android Java Linux
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic