• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

servlet

 
Val Dra
Ranch Hand
Posts: 439
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi is it possible to feed data to a servlet from another process and so that the servlet would display information to the client but still commnunicate with that other process without being requested over and over again ? Thanks.
 
Val Dra
Ranch Hand
Posts: 439
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well if anyone was interested how i did this , i never exit the doGet() method from the servlet this way i keep the client always requestion information when my Server class has something to send to servlet page it sends it and then the servlet send its to the client.
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a technique known as "server push", but be careful with it, it is not very good at going through proxies and web-cache systems, and can cause some browsers to report connection timeouts.
You may also want to consider "client pull" where the client requests a particular page every few seconds, and is always give the latest information. This is easy to do with the "refresh" header :- do a search in this forum for "refresh" for some examples.
 
Val Dra
Ranch Hand
Posts: 439
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi frank that's what i tried to avoid the refresh delay even if it's contents = 0 page will reload. With this technique i get no penalty. I didn't know there could be problems thanks for mentioning it but for now it's the only option for me.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic