You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Virginie Garcin <vi...@equitativa.com> on 2019/02/19 11:30:40 UTC
WebSocket
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
Re: WebSocket
Posted by Virginie Garcin <vi...@equitativa.com>.
Hello,
Indeed, it works with Tomcat 9!Thanks a lot for your help.
Virginie
On Tue, 2019-02-19 at 19:39 +0700, Maxim Solodovnik wrote:
> Or maybe with Tomcat-7 you need Wicket-7 and wicket-native-websocket-tomcat ....
> On Tue, 19 Feb 2019 at 18:44, Maxim Solodovnik <so...@gmail.com> wrote:
> > Shot in the dark: tomcat 7 is too old ...Does it work with tomcat 8/8.5/9 ?
> > On Tue, Feb 19, 2019, 18:30 Virginie Garcin <virginie.garcin@equitativa.com wrote:
> > > 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:
> > > @Overrideprotected 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
> > >
Re: WebSocket
Posted by Maxim Solodovnik <so...@gmail.com>.
Or maybe with Tomcat-7 you need Wicket-7 and wicket-native-websocket-tomcat ....
On Tue, 19 Feb 2019 at 18:44, Maxim Solodovnik <so...@gmail.com> wrote:
>
> Shot in the dark: tomcat 7 is too old ...
> Does it work with tomcat 8/8.5/9 ?
>
> On Tue, Feb 19, 2019, 18:30 Virginie Garcin <virginie.garcin@equitativa.com wrote:
>>
>> 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
>>
>>
--
WBR
Maxim aka solomax
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: WebSocket
Posted by Maxim Solodovnik <so...@gmail.com>.
Shot in the dark: tomcat 7 is too old ...
Does it work with tomcat 8/8.5/9 ?
On Tue, Feb 19, 2019, 18:30 Virginie Garcin <virginie.garcin@equitativa.com
wrote:
> 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
>
>
>