title: Grizzly / Glassfish - Cant establish websockets handshake
body: <p>I'm trying to get WebSockets working on top of Grizzly / Glassfish. I've cloned <a href="http://java.net/projects/grizzly/sources/git/show/samples/websockets/chat" rel="nofollow">the sample WebSockets chat application</a>, built it and deployed it to Glassfish 3.1.2. However, I cannot get WebSockets to connect. The WebSockets handshake is failing because I'm getting a 405 (Method Not Allowed) response. This makes sense because of what is in the Servlet:</p>
  
  <pre><code>public class WebSocketsServlet extends HttpServlet {
  
      private final ChatApplication app = new ChatApplication();
  
      @Override
      public void init(ServletConfig config) throws ServletException {
          WebSocketEngine.getEngine().register(app);
      }
  
      @Override
      public void destroy() {
          WebSocketEngine.getEngine().unregister(app);
      }
  }
  </code></pre>
  
  <p>There is no doGet method specified, so I'm wondering if there is more configuration required somewhere, or if you need to implement the handshake logic in the servlet doGet method yourself?</p>