Hello,

I'm trying to use WebSocket in Wicket 8.3.0, with Tomcat 7.0.85.

In pom, I have: 

<dependency>
        <groupId>org.apache.wicket</groupId>
        <artifactId>wicket-native-websocket-javax</artifactId>
        <version>${wicket.version}</version>
</dependency>

In web.xml, I did change the WicketFilter class name with:
<filter-class>org.apache.wicket.protocol.ws.javax.JavaxWebSocketFilter</filter-class>

In my page, I have:

@Override
protected void onInitialize() {
        super.onInitialize();

        add( new WebSocketBehavior() {
                @Override
                protected void onConnect(ConnectedMessage message) {
                        super.onConnect( message );
                        System.out.println( "onConnect" );
                        WebSocketService.getInstance().addClient( message );
                }
        }
}

When I open the page in the browser, the "onConnect" function is never 
called... 
(I also noticed that the class WicketEndpoint is never called, I feel that it 
should be called at some point).

Any idea of what I'm missing?

Thanks in advance,
Virginie


Reply via email to