Mark, >>Explicitly declare Tomcat's WebSocket filter and ensure it is the first filter in the processing chain. Can you please give a sample , how to create such filter.
I looked into the documentation , but cant find it On Sun, May 28, 2017 at 3:44 PM, Mark Thomas <ma...@apache.org> wrote: > On 28 May 2017 10:09:03 BST, Bhuvan Gupta <bhuva...@gmail.com> wrote: > >Hello, > > > > > > > >I create a sample webapp using servlets and http, which work fine and > >the > >web.xml looks like > > > ><filter> > > <filter-name>guiceFilter</filter-name> > ><filter-class>com.google.inject.servlet.GuiceFilter</ > filter-class></filter> > ><filter-mapping> > > <filter-name>guiceFilter</filter-name> > > <url-pattern>/*</url-pattern></filter-mapping> > > > >Now i want to add few @ServerEndPoint class to use websocket. So i > >added a > >class and added @ServerEndpoint(value = "/websocket/chat) on that > >class. > > > >Now i expected that when i use websocket client and use > >ws://localhost:8080/app/websocket/chatto connect it should work but it > >does > >not as i already have a /* filter which redirect request to > >guiceFilter. > > > >*If i comment the filter it works fine.* > >------------------------------ > > > >*Question:* > > > >How can i tell tomcat to first consider serverEndPoint url for routing > >the > >request before matching the filter url patterns ? > > Explicitly declare Tomcat's WebSocket filter and ensure it is the first > filter in the processing chain. > > Mark > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >