Also, I found several examples of this same issue on stack overflow with no solutions.

-------- Original Message --------
Subject:        Tomcat 8 websocket example
Date:   Fri, 18 Apr 2014 12:28:56 -0400
From:   Thom Hehl <th...@corrisoft.com>
To:     users@tomcat.apache.org



I have downloaded the websocket example echo in the examples section of
the tomcat 8 docs. I downloaded both java classes and the xhtml file and
have placed all of these in my eclipse project. I then created a basic
web.xml which is:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee";
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd";
      version="3.0">
    <welcome-file-list>
        <welcome-file>echo.xhtml</welcome-file>
    </welcome-file-list>
</web-app>

I build all of this into a war with my libraries. I've stripped out the
javax.websocket libraries by hand from the jar file just to get the test
working.

I place this in tomcat, start it, and go to:
http://localhost:8080/examples/echo.xhtml. When I choose either API and
click connect, it immediately responds with: Info: WebSocket connection
closed, Code: 1006.

Since I'm just running an example, I can't see where I've erred.



Reply via email to