On Sun, Aug 28, 2016 at 5:07 AM Mark Thomas <m...@homeinbox.net> wrote:
> On 28 August 2016 02:33:00 BST, "John D. Ament" <johndam...@apache.org> > wrote: > >Hi, > > > >I have this pretty straight forward case of starting an instance of > >tomcat > >and bringing in a filter. > > <snip /> > > >When starting this up (Just running in a plain JUnit test), the > >container > >is running however making requests to localhost:8080/ just result in > >404's. I'd expect my filter to handle those requests. > > > >When using a servlet, its perfectly fine. > > > >I tried it on both 8.5.4 and 8.0.30. > > > >Any ideas? > > The Mapper (the component that Maps requests to the correct Host + Context > + Servlet) expects to map a request to a Servlet and returns a 404 if none > is found even if there is a filter that will handle the request. > > Normally you'd never see this behaviour because of the Default Servlet. > Ah ha, perfect tip! I can simply programmatically register default servlet if none found. And that works! > > Mark > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >