java - WebSockets served by a Servlet Container -


I was putting a look at WebSocket last week and some ideas about implementing server side with Java servlet API Done I did not spend too much time, but during some tests with Tomcat, participated in the following problems, which seems impossible to resolve without the patching of the container or at least the container is making specific modifications to the HTTPPreserveation implementation:

  • WebSocket specification 101 mandates a message defined in HTTP response. HttpServletResponse.setStatus (int code, string message) has been deprecated without mentioning a useful replacement. After changing the default tomcat configuration, I assumed Tomcat as my message string, but since the method has been deprecated, I'm not sure That it will work with other servlet containers.

  • WebSocket specification requires the specified command of some headers in the HTTP response to the connection upgrade request. Servicelet API does not provide a method to specify the order of the header of feedback and Tomcat adds to its header for response, some of them are placed before any headers, which are added by the servlet implementation.

  • Since the length of the content of the reaction is not known when preparing the header, as the badge automatically switches to the transfer transfer encoding for the response, with the websacet specification Incompatible.

itemprop = "text">

in There is an implementation we can expect that Tomcat and JT search for a compatible API.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -