I'm not sure you need filters for this. define your servlet mapping in web.xml to be *.html
Then you can set up a <welcome-file-list> to go to index.html, which would route to your servlet based on it ending with .html it's that simple. Charlie > -----Original Message----- > From: Mark Beecroft [mailto:[EMAIL PROTECTED]] > Sent: Sunday, July 21, 2002 8:30 PM > To: Tomcat Users List; Jacob Kjome > Subject: filtering --> 2 servlets > > > Good morning/afternoon/evening, > > I am using Tomcat 4 and have 2 servlets between which I would > like to split > processing. Servlet A needs to process all requests > corresponding to the > patterns "*.html", "*.html" and "/". Servlet B needs to > process all other > requests. The short question is how can I do this? > > I am currently using filters but am finding it difficult to > cater for the > pattern "/". The only option seems to be the use of the url > mapping "/*" > to invoke a filter class, but then how does processing get to > Servlet B? If I > only invoke chain.doFilter() when the pathinfo satisfies the > conditions of > Servlet A then I can get Servlet A working normally, but > there seems no way > of ever invoking Servlet B with such a configuration. To demonstrate: > > http://www.domainname.com/index.html --> Servlet A > http://www.domainname.com/whatever.htm --> Servlet A > http://www.domainname.com/ --> servlet A > http://www.domainname.com/image.jpeg --> no Servlet accessed > > What I really would like is a more versatile url-pattern > element, but does > anyone have a solution for my current situation... please... > > Cheers, > Mark > P.S. If you help me out I'll by you a pint when you next come > to England! > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>