0

I am invoking applet through JNLP from my application (which is hosted on tomcat server) and it is working fine. Now from applet I need to send the response back to the application or browser.

In my search, I found that we can do this using web socket. But not sure from where to start.

Can you please let me know any idea on this.

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
Vijaya
  • 157
  • 1
  • 16

1 Answers1

0

I think you need some kind of push notifications. One way of doing this as you already mentioned is with websockets and there are bunch of tutorials on the web as well as a question here on stackoverflow How to implement push to client using Java EE 7 WebSockets? The second way is with server polling (frequently sending requests and checking for new events/states/subscribers etc.)

Community
  • 1
  • 1
  • Thank for your response. I have followed the link you have given..actually i have developed one small application using web socket to communicate client and server, it is working fine. but i am not sure how to invoke jnlp and get response back using websocket. – Vijaya Apr 12 '17 at 06:41
  • the second way we can accomplish through ajax right? – Vijaya Apr 12 '17 at 06:41
  • 1
    "the second way we can accomplish through ajax right" - yes! If you are using angularjs check out service $interval https://docs.angularjs.org/api/ng/service/$interval – Gyunesh Shefkedov Apr 12 '17 at 06:51
  • we are not using angularjs and i can not using ajax polling also because of server related problems.... – Vijaya Apr 12 '17 at 06:55