Hi Tom, The problem really is in wicket-websocket-jquery.js. It does: url = protocol + '//' + document.location.host + WWS.contextPath + WWS.filterPrefix + '/wicket/websocket';
A workaround for you is to add url rewrite rule to Nginx to forward it to Tomcat. Please file an issue at JIRA and I'll see how this could be improved. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Wed, Oct 5, 2016 at 4:31 PM, Tom Götz <t...@decoded.de> wrote: > Hm, no solution yet … anyone got a working example or some hint maybe? > > Tom > > > > On 05.10.2016, at 15:57, Tom Götz <t...@decoded.de> wrote: > > > > Maybe answering my own question, but this here could help … I’ll give it > a try: > > http://stackoverflow.com/questions/32287103/how-to-use- > nginx-as-a-proxy-for-wicket-application-using-websockets > > > > Cheers, > > Tom > > > > > >> On 05.10.2016, at 15:36, Tom Götz <t...@decoded.de> wrote: > >> > >> Hi there, > >> > >> I have the following scenario: > >> > >> 1. > >> a Spring-Boot Wicket application with Tomcat running on Port 8080 that > uses Wicket WebSockets impl running in the servlet root context > >> > >> 2. > >> a ngnix server that proxies /MyLocation to the mentioned Wicket app > >> > >> As there is no servlet context involved, the generated WebSockets > endpoint url is generated by Wicket as: ws://mydomain.com/wicket/ > websocket?pageId=1&wicket-ajax-baseurl=... > >> > >> I saw that this url is generated in BaseWebSocketBehavior#renderHead > by asking the request for the context path: > >> > >> String contextPath = component.getRequest().getContextPath(); > >> variables.put("contextPath", contextPath); > >> > >> As I don’t have a contextPath, this fails: > >> > >> WebSocket connection to 'ws://mydomaon.com/wicket/ > websocket?pageId=1&wicket-ajax-baseurl=...' failed: Error during > WebSocket handshake: Unexpected response code: 404 > >> > >> Does the Wicket WebSocket API provide a way to handle such a scenario? > Currently, I’m studying the code but any pointer would be helpful … > >> > >> Cheers, > >> Tom > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >