title: Getting errors in Websocket server Endpoint
body: <p>This is file and I am getting compilation error in <code>import javax.websocket</code> lines and in <code>@serverEndpoint("/websocket")</code>. Why it is not taking the annotation?</p>
  
  <pre><code>package pack.exp;
  import java.io.IOException;
  import java.util.Collections;
  import java.util.HashSet;
  import java.util.Set;
  
  import javax.websocket.OnClose;
  import javax.websocket.OnMessage;
  import javax.websocket.OnOpen;
  import javax.websocket.Session;
  import javax.websocket.server.ServerEndpoint;
  
  @ServerEndpoint("/websocket")
  public class Hello 
  {
  {
  
        private static Set&lt;Session&gt; clients = 
          Collections.synchronizedSet(new HashSet&lt;Session&gt;());
  
        @OnMessage
        public void onMessage(String message, Session session) 
          throws IOException {
  
          synchronized(clients){
            // Iterate over the connected sessions
            // and broadcast the received message
            for(Session client : clients){
              if (!client.equals(session)){
                client.getBasicRemote().sendText(message);
              }
            }
          }
  
        }
  
        @OnOpen
        public void onOpen (Session session) {
        // Add session to the connected sessions set
          clients.add(session);
        }
  
        @OnClose
        public void onClose (Session session) {
          // Remove session from the connected sessions set
          clients.remove(session);
        }
  
      }
  }
  </code></pre>
  
  <p>Please Help me with this error. Are there some specific api which I have to implement in this code?</p>