Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] jetty 7 websocket debug

Hey Peter,

I cannot answer your questions about generating tracings for WebSockets in Jetty to 
verify it works with GWT.

BUT I know from experience, GWT does work with WebSockets.  Take a look at this thin GWT wrapper for WebSockets in the gwt-websocketrpc project:
http://code.google.com/p/gwt-websocketrpc/source/browse/#svn/gwt-websocketrpc/src/org/gwt_websocketrpc/client/websocket

As for getting the URL correct, I just had to point the WebSocket to the WebSocketServlet's URL as specified by it's url-pattern, and replace http:// -> ws://.  I did have some problems with connecting WebSockets and Jetty through 127.0.0.1 and localhost, but I think it that might have just been my Ubuntu setup...

One thing that may interest you is my gwt-websocketrpc project itself.
This project aims to build off of GWT RPC framework and just replace the how client/server communications is implemented.  With gwt-websocketrpc, just some small changes to any existing RPC Services (extend a different interface and servlet class) and now the service is using WebSockets instead of XHR.  Calling which URL, object serialization, and handling AsyncCallbacks are taken care of.

Hopefully some part of this rambling helped...


On Mon, Jan 25, 2010 at 2:49 PM, Peter Bridge <peter_bridge@xxxxxxxxxxx> wrote:
I'm looking at getting GWT to interface to the Jetty websocket
implementation.

I'd like to know if I can get jetty to generate some debug output for
webSockets.

I've had a sniffer running and I see a websocket request hit jetty, but
then it seems to vanish, I only get the tcp ACK back.  Also I'd like
some details on the correct ws url I should use.  Lets say my servlet is
deployed in a subfolder of webapps called wstest and my servlet is url
filtering for /echotest.  Is the following going to be sufficient?

ws://192.168.1.4:8080/wstest/echotest

I saw some discussion that connections would fail if this is not exactly
matching what jetty is expecting.  From the blog entry I saw the simple
replace http: with ws: example, but in my case this wont work since the
GWT is being served from a page with a big long gwt type url.

Anyway I'm sure if I can get some debug out of jetty I should be able to
get a bit further.  Thanks in advance!
Peter
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users



--
~ Peter Wong

Back to the top