Question

I have a JNLP application that I launch from a HTML/CSS/JS webpage. When the JNLP application reaches a specific point of it's execution, I want to update the information in my webpage.

Is there any good method of communicating with JavaScript during runtime of the JNLP application? For instance to send a message that tells the JavaScript to update/send an ajax request/etc.

Was it helpful?

Solution

I had pretty much the same requirement for my application, and I implemented it with a Comet communication.

Basically your JavaScript should connect to a generated channel per user, and listen to messages on it. Then your Java application, once launched, should open a connection to this channel and broadcast a "I'm ready" message, that the JavaScript application will receive, and then act accordingly.

Good luck, it's not that easy :) More details on http://cometd.org/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top