On Sat, 18 Jan 2003, Affan Qureshi wrote:
> Date: Sat, 18 Jan 2003 16:35:19 +0500 > From: Affan Qureshi <[EMAIL PROTECTED]> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]> > To: tomcat-user <[EMAIL PROTECTED]> > Subject: Filter shows blank page in 4.1.18 > > I had filters configured for my webapp which worked in Tomcat 4.1.12 but now > when I have installed 4.1.18 I get a blank page for *some* of my pages which > do *not* contain images. The ones that contain images look fine and the > filter works on them too. Strange problem. What must I be doing wrong? > Most likely your filter is throwing an exception. Check the log files in $CATALINA_HOME/logs for details. > Also can I map filters based on content-type instead of urls? > In the deployment descriptor, you can filter on either servlet name or URL pattern. However, it's pretty easy to set up your own filtering on content type along the following lines: * Map your filter to "/*". * Create a response wrapper that lets you get the content type from the response (see my post yesterday with example code), and/or add this ability to your own response wrapper. * In your doFilter() method, retrieve the content type and do the right thing for the right content types. Craig -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>