0

I have a requirement as below

  • user logs into a portal
  • server validates credentials.
  • Now server should be in a position to open a URL in browser of client machine at later point of time based on triggered events on server side .

I haven't carried this kind of task before. So any suggestions on how to approach this task is highly appreciated.

ajit
  • 3
  • 3
  • http://stackoverflow.com/questions/5226212/how-to-open-the-default-webbrowser-using-java – Justplayit94 Sep 12 '16 at 11:48
  • Does the _portal_ in _user logs into a portal_ mean a web-based portal (web application)? If yes, then what kind a real JSR168/286 based portal like Liferay, or some other "portal-like" web application? – Jozef Chocholacek Sep 12 '16 at 13:16
  • @Justplayit94, i have already tried java.awt.Desktop API. It will open browser in server side...not in client side – ajit Sep 12 '16 at 14:14
  • @Jozef Chocholacek, yes, It's web application. My problem is once user logged in, how server can take initiation and send URL to client, and how client will listen to this communication? – ajit Sep 12 '16 at 14:19
  • Well, that can be quite hard, in general. There are - as usual - some possibilities, but without knowing more about your application, it's hard to advice the best solution. One approach is e.g. to use some kind of web service server-side, and an AJAX call fired regularly from the browser, asking the server "is there something I should do?", another could be the use of the [WebSockets API](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API). Hard to say without knowing much more details. – Jozef Chocholacek Sep 12 '16 at 14:27

0 Answers0