[ 
https://issues.apache.org/jira/browse/WICKET-5453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13852902#comment-13852902
 ] 

Martin Grigorov commented on WICKET-5453:
-----------------------------------------

Thanks for letting us know!
But unfortunately it is not that simple. 

1) -jetty9 module is used for Jetty 9.0.x, so WebSocketUpgradeFilter is not 
available
For Jetty 9.1.+ we use the standard JSR 356 APIs - 
https://github.com/apache/wicket/tree/master/wicket-experimental/wicket-native-websocket/wicket-native-websocket-javax
At the moment Tomcat 7.0.47+/8.x and Jetty 9.1.x are supported by this module. 
We cannot depend on container specifics here.

2) It is not easy to use normal servlet filter chaining because we need 
functionality/information from both Jetty/Tomcat/... and WicketFilter.
See 
https://github.com/apache/wicket/blob/master/wicket-experimental/wicket-native-websocket/wicket-native-websocket-core/src/main/java/org/apache/wicket/protocol/ws/AbstractUpgradeFilter.java?source=c#L75
It has some code that I copied from Jetty 7/8 and Tomcat 7 to be able to check 
whether this is a WebSocket connection.
It would be much better for integrations like Wicket's Native WebSocket if the 
web container provided helper classes/methods that check this info and return a 
result. Since I wasn't able to reuse Jetty/Tomcat's WebSocketServlet I had to 
copy this code locally :-/ 

> Jetty 9.1.0 has its own UpgradeFilter, use it
> ---------------------------------------------
>
>                 Key: WICKET-5453
>                 URL: https://issues.apache.org/jira/browse/WICKET-5453
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-native-websocket
>    Affects Versions: 7.0.0
>            Reporter: Joakim Erdfelt
>            Assignee: Martin Grigorov
>            Priority: Minor
>
> In a recent stackoverflow question ..
> http://stackoverflow.com/questions/20661139/websocket-timeout-with-apache-wicket-and-embedded-jetty
> I noticed a reference to a class called Jetty9WebSocketFilter
> Starting in Jetty 9.1.0, a filter for websocket upgrade ships with Jetty.
> See answer (with example code):
> http://stackoverflow.com/a/20663447/775715



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Reply via email to