Correctly shutting down a websocket handler
by Robin Anil
When a client disconnects, I see that onClose is not being fired. The only
way this seems to be firing if client sents a close frame.
Is there any way to detect disconnection and immediately close all the
opened resources.
Robin
Robin Anil | Software Engineer
1 year, 5 months
Forwarding initial websocket request
by Lukas Lentner
I am trying to forward the initial websocket http request coming in via a Servlet filter with the forward method (I want to cut off the first path segment):
final String requestUri = HttpServletRequest.class.cast(servletRequest).getRequestURI();
final String newRequestUri = requestUri.substring(requestUri.indexOf("/", 1));
servletRequest.getRequestDispatcher(newRequestUri).forward(servletRequest, servletResponse);
The filter is triggered successfully, but the websocket is not …
[View More]initialized instead 404 is returned.
Is this correct according to spec? How can I forward such requests?
Thankx
Lukas
[View Less]
6 years, 3 months