I have question about jetty 8.1.10.v20130312 and WebSocket. Here is the code:

**web.xml** 

```xml
<listener>
    <listener-class>ru.websocket.StartupListener</listener-class>
</listener>

```

**StartupListener.java** 

```java
public class StartupListener implements ServletContextListener {

public void contextDestroyed(ServletContextEvent arg0) {

}

public void contextInitialized(ServletContextEvent arg0) {
    Server server = new Server(8081);
    EventHandler handler = new EventHandler();
    server.setHandler(handler);
    try {
        server.start();
        System.out.println("Server started");
    } catch (Exception e) {
        e.printStackTrace();
    }
}

}

```

**EventHandler.java**

```java
public class EventHandler extends WebSocketHandler {

public WebSocket doWebSocketConnect(HttpServletRequest arg0, String arg1) {
     return new EventWebSocket();
}

}

```

**EventWebSocket.java**

```java
public class EventWebSocket implements WebSocket {

public void onClose(int arg0, String arg1) {
    System.out.println("closed");
}

public void onOpen(Connection arg0) {
    System.out.println("opened");
}

}

```

When i want to connect from javascript, i have a error message 

```
2013-07-15 18:02:02.433:WARN:oejs.AbstractHttpConnection:/
java.lang.NullPointerException
        at org.eclipse.jetty.websocket.WebSocketFactory.upgrade(WebSocketFactory.java:238)
        at org.eclipse.jetty.websocket.WebSocketFactory.acceptWebSocket(WebSocketFactory.java:396)
        at org.eclipse.jetty.websocket.WebSocketHandler.handle(WebSocketHandler.java:43)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
        at org.eclipse.jetty.server.Server.handle(Server.java:368)
        at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
        at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942)
        at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004)
        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)
        at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
        at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
        at java.lang.Thread.run(Thread.java:662)

```

About build, i use maven, java version 1.6.31, jetty version 8.1.10.v20130312.
**Important**
I want to start new Jetty server with port 8081 from Jetty on port 8080 (StartupListener).

Thanks for answer.