2 Replies Latest reply on Dec 22, 2011 12:47 PM by ronorato

    Issue with Advanced IO

    ronorato Newbie

      I have have some problems with getting HttpEventServlet to respond to the BEGIN event from my web client.  Using WireShark I am seeing the handshake request begin sent from the web client to the web server.  Using my tracing I am seeing the BEGIN event being called, but I am not seeing the web server respond back to the web client.  This is causing the web client to timeout and retry the handshake.


      Here is the event method from my servlet that implements HttpEventServlet:


      public void event(HttpEvent event)

          throws IOException, ServletException


          log.info("event() entered");


          HttpServletRequest request = event.getHttpServletRequest();

          HttpServletResponse response = event.getHttpServletResponse();


          switch (event.getType()) {

            case BEGIN:

              log.info("Begin for session: " + request.getSession(true).getId());

              StringBuilder toLog = new StringBuilder();


               Enumeration params = request.getParameterNames();

              // Debug code

              while(params.hasMoreElements()) {

                  String current = (String) params.nextElement();

                  toLog.append(current + "=" + request.getParameter(current));

                  if(params.hasMoreElements()) {

                      toLog.append(", ");



              log.warn("BEGIN Parameters: " + toLog.toString());






      the debug code produces the following output:


      13:43:09,688 INFO  event() entered

      13:43:09,688 INFO  Begin for session: PJG9NHvS1qi t-vJE7uDDJisF

      13:43:09,688 WARN  BEGIN Parameters: message=[{"version":"1.0","minimumVersion":"0.9","channel":"/meta/handshake","id":"6","supportedConnectionTypes":["long-polling","long-polling-json-encoded","callback-polling"]}]


      Any help would be greatly appreciated.