Tomcat 5.0 web.xml filter mapping <url-pattern>/content/*.jsp

From: P.Hill (goodhill_at_xmission.com)
Date: 02/28/04

  • Next message: P.Hill: "Re: Tomcat 5.0 web.xml filter mapping <url-pattern>/content/*.jsp"
    Date: Fri, 27 Feb 2004 17:13:54 -0700
    
    

    I am having problem using filter mapping in in Tomcat 5.0 on windows
    I tried the following in my web.xml.
    ...
    <filter-mapping>
    <filter-name>foo.bar.MyFilter</filter-name>
         <url-pattern>/content/*.jsp</url-pattern>
       </filter-mapping>
    ...
    When I start Tomcat it tells me:
    SEVERE: Parse error in application web.xml
    java.lang.IllegalArgumentException: Invalid <url-pattern> /content/*.jsp in
    filter mapping
    at org.apache.commons.digester.Digester.createSAXException(Digester.java:2540)
            at org.apache.commons.digester.Digester.createSAXException(Digester.java:2566)
            at org.apache.commons.digester.Digester.endElement(Digester.java:1061)
    ...

    It doesn't do it in a friends Tomcat 4.1 on Linux
    Is this some kind of change in behavior from Tomcat 4.0 to 5.0?
    (Tomcat 5.0 is Servlet API 2.4 and JSP 2.0)

    The idea is that I want it to run my this filter before all JSP pages, but
    not with all .jpg, .gif requests that come in, even if they are within
    the some directory structure.

    Seems simple enough in the example from a friends Tomcat 4.0

    -Paul


  • Next message: P.Hill: "Re: Tomcat 5.0 web.xml filter mapping <url-pattern>/content/*.jsp"

    Relevant Pages

    • Re: Eclipse + WTP Help
      ... Edit> (what's selected in the JRE field?) ... If you don't have a 1.5 JRE, it's possible to run Tomcat 5.5 with ... Probably its the easiest to define the JAVA_HOME environment variable if you are on Windows. ... select the Environment tab; on Microsoft Windows 2000/XP select the Advanced tab and then Environment Variables. ...
      (comp.lang.java.programmer)
    • Tomcat 5.5.15 running as a service or manually started... and trying to read a File
      ... Running Tomcat 5.5.15, with JRE 1.5.0_06. ... When I have Tomcat started as a Windows service, ... I am logged into the server via ... Remote Desktop as my network account login. ...
      (comp.lang.java.programmer)
    • Integrated Windows Authentication in IIS + tomcat
      ... We have deployed a environment consists of a Windows 2000 ... Server with IIS + Tomcat. ... IIS works fine using ISAPI. ... with NTLM authentication mechanism we know how to get ...
      (microsoft.public.inetserver.iis.security)
    • New thread: Which version of Tomcat?
      ... I am sorry, I meant, Tomcat. ... tar.gz (pgp, md5) ... Windows Service Installer ...
      (comp.lang.java.programmer)
    • Re: Tomcat 5.0 dies/exits with no info in log files
      ... I'm troubleshooting a problem with a web application running on Tomcat ... with Java 1.4.2_07 on Windows. ... Tomcat suddenly dies or exits ...
      (comp.lang.java.programmer)