Hm, no solution yet … anyone got a working example or some hint maybe?

   Tom


> On 05.10.2016, at 15:57, Tom Götz <[email protected]> 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 <[email protected]> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to