1

I'm experiencing abnormal behaviour in ajax-related clicks in two Wicket Applications that both run on the same localhost on different ports (both served by Jetty)

I have two applications open in two tabs in Chrome. When I click on an AjaxLink in one of the applications, it sometimes works and sometimes does nothing (or something in the other Wicket tabs, as I see the tab title doing something).

This leads to undesired behaviour, as the links no longer work as required.

What can I do to prevent this interaction between tabs?

Rob Audenaerde
  • 19,195
  • 10
  • 76
  • 121
  • This is not behavior provided by Wicket. If it happens then it is a bug either in Wicket or in your application(s). – martin-g Feb 09 '16 at 12:30
  • I find it hard to blame Wicket here as this happens across different applications running on completely isolated server instances. Does this happen in all browsers, or just Chrome like in your previous similar problem with AjaxLink? http://stackoverflow.com/questions/29508123/wicket-multi-tab-ajax-page-serialization – Gimby Feb 09 '16 at 12:33
  • It might be related to this: http://stackoverflow.com/questions/5619388/why-does-running-multiple-wicket-applications-cause-ajax-conflicts – Gimby Feb 09 '16 at 12:37
  • @Gimby yes that seems related (even duplicate?) – Rob Audenaerde Feb 09 '16 at 12:58
  • Possibly you can try it out by making one server listen on your internal (network) IP address rather than localhost, then access that application through the IP address in your browser. – Gimby Feb 09 '16 at 13:00
  • 1
    @robau if that solves it or is a valid workaround, consider creating a self-answer. – Gimby Feb 09 '16 at 14:39
  • @robau you're not going to get any with what little you've presented, and it is perfectly valid for a question to have multiple answers. – Gimby Feb 10 '16 at 07:55

1 Answers1

0

I now use this:

this.getServletContext().getSessionCookieConfig().setName( applicationCookieName )

And change the applicationCookieName per application, that seems to prevent it.

It is probably caused by the JSESSIONID being shared by default, as can written in this answer: https://stackoverflow.com/a/5646933/461499

Community
  • 1
  • 1
Rob Audenaerde
  • 19,195
  • 10
  • 76
  • 121