Call a user's Vaadin app from an external webpage?

Does anyone know the “correct” or best way to call a Vaadin application from an external webpage?

Suppose we’ve sent a user to an outside webpage, in the same browser they had been using for the Vaadin App. They should still have the session cookie in their browser, correct? Is there a way for that outside webpage to take the user’s Vaadin cookie, and send a message back to their specific Vaadin application? (perhaps using JQuery or something?)

This is what I’m trying to do: send a user to an external survey website, and when the survey ends I want the survey page to send a message and tell the user’s Vaadin app that the user has finished their survey. Then, when the user gets redirected back to the Vaadin website it will know that the user has finished the survey.

Thanks for any help, I appreciate it!

Doesn’t sound like a Vaadin application related problem. Maybe others can come up with better solutions, but as I see it you either use tracking cookies (third-party cookies), which the user’s browser settings may block or then you expose some service API from your back-end that the survey page can call to your Vaadin application’s back-end.

Yes, I think those are possible ways to do it.

  1. You
    could
    expose a REST api call and just notify the Vaadin server that you’ve finished the survey, but from what I’ve read I don’t think it will be possible for JQuery (or anything) to read Vaadin’s session cookie in the browser (browser security). That makes total sense; you don’t want other sites to be reading your cookies.

  2. Or, I guess you could just redirect the user back to the Vaadin webpage and add a URL parameter, read that parameter, and do whatever state change is necessary to continue on with the application. I don’t know I didn’t think of it before. I guess it is that simple?

Thanks for the help Jahannes.