You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Bob DeRemer <bo...@thingworx.com> on 2013/09/10 16:08:28 UTC

can a Filter be used to pre-process calls to a websocket endpoint?

Is it possible to programmatically add a Servlet Filter to Tomcat during the ContextInitialized call so that it filters requests going to a websocket endpoint?


Thanks,

Bob DeRemer
Senior Director, Architecture and Development

[Description: Description: Description: Description: cid:image001.png@01CBE3DE.51A12030]
http://www.thingworx.com<http://www.thingworx.com/>
Skype: bob.deremer.thingworx
O: 610.594.6200 x812
M: 717.881.3986


RE: can a Filter be used to pre-process calls to a websocket endpoint?

Posted by Bob DeRemer <bo...@thingworx.com>.
> From: Bob DeRemer [mailto:bob.deremer@thingworx.com] 
> Sent: Tuesday, September 10, 2013 10:08 AM
> To: Tomcat Users List
> Subject: can a Filter be used to pre-process calls to a websocket endpoint?

> Is it possible to programmatically add a Servlet Filter to Tomcat during the ContextInitialized call so that it filters requests going to a websocket endpoint?  

My apologies for posting before trying.  I was able to do this using ServletContext.addFilter and the FilterRegistration.Dynamic functionality.  As I suspected, by adding a mapping for the respective URLs, the request is filtered - regardless of whether it's going to a Servlet or WebSocket Endpoint.

> Thanks,

> Bob DeRemer
> Senior Director, Architecture and Development


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org