[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Re: NPE in WebSocketServlet

The problem seems to be running the application from NetBeans with the jetty-maven-plugin. If I deploy my application to a standalone Jetty it works!

Any idea?

2010/3/2 Sven Jacobs <sven.jacobs@xxxxxx>
Well, the demo from the default distribution runs. So I compared what's different between the demo and my app and found:

* In my app the WebSocket servlet is bound to the URL /test
* In the demo it's /ws/*

* In my app the context from which the WS is tried to be opened is /
* In the demo it's also /ws/

* The demo servlet overrides the doGet() method
* Mine doesn't

So I changed:

* WebSocket servlet overrides doGet() method exactly as in the demo
* Context of WS now also is /ws/*
* Put index.html into a new folder /ws

But still I receive the NPE :(

2010/3/2 Greg Wilkins <gregw@xxxxxxxxxxx>
Sven Jacobs wrote:

> Hello Greg,
>
> can you please point me to the WebSocket demo? I didn't find it in the
> Maven repository.

Well I've just recently blogged a little about it, so you can see
pointers off the blog to the source

Âhttp://blogs.webtide.com/gregw/entry/websocket_chat


But the demo is included with the test webapp in Jetty-7.0.1
Just run up the default distro and you should see a chat
demo offered in the index page, both a long polling and a
websocket version.


cheers
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users