• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Client-side Listener

 
Ranch Hand
Posts: 305
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,
I'm researching an issue which has come up in a JSP/Servlet web application. Specifically, the application requires a real-time communication link between the client and server. So, for example, the client sends a request to the server to run job Foo. The server takes its time, completing job Foo in 3 minutes.

Now, how can the server actively send a completion notice to the client?

Naturally, we're moving beyond the capabilities of a simple HTTP server in order to establish a two-way messaging routine between client and server. I'd like to stay away from a mechanism that simply polls the web server until the job is complete. So, applet, JMS? I'm not sure what the best route to go is, so if anyone has experience with this issue, I'd appreciate suggestions.

Thanks!
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
XMLHttpRequest() would help you I think....
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Socket programming with applets is not too difficult.
 
Jeffrey Hunter
Ranch Hand
Posts: 305
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, guys. The applet was our immediate solution, but we are after something a bit more efficient. Our goal is to maintain a "connection" between the client-server, and have communication occur in the background. It appears that the XMLHttpRequest object serves exactly this purpose.

Thanks, Eric, for providing this tip.
reply
    Bookmark Topic Watch Topic
  • New Topic