title: Jersey, REST and web.xml disables @ServerEndpoint websocket when run in Eclipse
body: <p>I know this is a <a href="https://stackoverflow.com/questions/26339217/serverendpoint-and-web-xml">duplicate</a>, but this question has not been answered yet!</p>
  
  <p>If a REST servlet ist loaded my ServerEndpoint is not loaded. If I rename web.xml the socket is working as expected. I run this application on tomcat9. This is my Endpoint:</p>
  
  <pre><code>@ServerEndpoint(value = "/talk/{BenutzerID}/{Grad}/{Accesskey}")//, encoders = MessageEncoder.class, decoders = MessageDecoder.class)`
  public class talk {
  
  //static Set&lt;Session&gt; peers = Collections.synchronizedSet(new HashSet&lt;Session&gt;());
  
  public talk()
  {
      System.out.println("Talk started! " + this.getClass().toString());
  }
  
  @OnOpen
  public void onOpen(@PathParam("BenutzerID") Long BenutzerID,
          @PathParam("Grad") long Kontaktgrad,
          @PathParam("Accesskey") String Accesskey, 
          Session session) {
  </code></pre>
  
  <p>And this is my web.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"&gt;
    &lt;display-name&gt;Archetype Created Web Application&lt;/display-name&gt;
    &lt;servlet&gt;
      &lt;servlet-name&gt;jersey-serlvet&lt;/servlet-name&gt;
      &lt;servlet-class&gt;com.sun.jersey.spi.container.servlet.ServletContainer&lt;/servlet-class&gt;
      &lt;init-param&gt;
        &lt;param-name&gt;com.sun.jersey.api.json.POJOMappingFeature&lt;/param-name&gt;
        &lt;param-value&gt;true&lt;/param-value&gt;
      &lt;/init-param&gt;
      &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
    &lt;/servlet&gt;
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;jersey-serlvet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/rest/*&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>