Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Struts - A MVC web framework
Tomcat - JSP/Servlet container
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
JSP - A mailing list about Java Server Pages specification and reference
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
cannot get Filters to work with Tomcat 5.0.16

cannot get Filters to work with Tomcat 5.0.16

2004-01-06       - By Patrick Scheuerer

 Back
Reply:     1     2     3     4     5     6     7     8     9     10  

Hi,

I cannot get Filters to work with Tomcat 5.0.16.

Here are my filter definitions in web.xml:
<filter>
    <filter-name>UserFilter</filter-name>
    <filter-class>ch.ctc.support.common.UserFilter</filter-class>
</filter>

<filter>
    <filter-name>AdminFilter</filter-name>
    <filter-class>ch.ctc.support.common.AdminFilter</filter-class>
</filter>

<filter-mapping>
    <filter-name>UserFilter</filter-name>
    <servlet-name>/*</servlet-name>
</filter-mapping>

<filter-mapping>
    <filter-name>AdminFilter</filter-name>
    <url-pattern>/admin/*</url-pattern>
</filter-mapping>

Every time Tomcat tries to start the context I get the following exception:

java.lang.IllegalArgumentException Source code of java.lang.IllegalArgumentException: Filter mapping must specify either a
<url-pattern> or a <servlet-name>
    at org.apache.commons.digester.Digester Source code of org.apache.commons.digester.Digester(Digester.java
:2540)
    at org.apache.commons.digester.Digester Source code of org.apache.commons.digester.Digester(Digester.java
:2566)
    at org.apache.commons.digester.Digester Source code of org.apache.commons.digester.Digester(Digester.java:1061)
    at org.apache.xerces.parsers.AbstractSAXParser Source code of org.apache.xerces.parsers.AbstractSAXParser(Unknown Source)
    at org.apache.xerces.impl.dtd.XMLDTDValidator Source code of org.apache.xerces.impl.dtd.XMLDTDValidator(Unknown
Source)
    at org.apache.xerces.impl.dtd.XMLDTDValidator Source code of org.apache.xerces.impl.dtd.XMLDTDValidator(Unknown
Source)
    at org.apache.xerces.impl.dtd.XMLDTDValidator Source code of org.apache.xerces.impl.dtd.XMLDTDValidator(Unknown Source)
    at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl Source code of org.apache.xerces.impl.XMLDocumentFragmentScannerImpl(Unknown
Source)
    at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl Source code of org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher
.dispatch(Unknown
Source)
    at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl Source code of org.apache.xerces.impl.XMLDocumentFragmentScannerImpl(Unknown
Source)
    at org.apache.xerces.parsers.XML11Configuration Source code of org.apache.xerces.parsers.XML11Configuration(Unknown Source)
    at org.apache.xerces.parsers.DTDConfiguration Source code of org.apache.xerces.parsers.DTDConfiguration(Unknown Source)
    at org.apache.xerces.parsers.XMLParser Source code of org.apache.xerces.parsers.XMLParser(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser Source code of org.apache.xerces.parsers.AbstractSAXParser(Unknown Source)
    at org.apache.commons.digester.Digester Source code of org.apache.commons.digester.Digester(Digester.java:1548)
    at
org.apache.catalina.startup.ContextConfig Source code of org.apache.catalina.startup.ContextConfig(ContextConfig.java
:302)
    at org.apache.catalina.startup.ContextConfig Source code of org.apache.catalina.startup.ContextConfig(ContextConfig.java:644)
    at
org.apache.catalina.startup.ContextConfig Source code of org.apache.catalina.startup.ContextConfig(ContextConfig.java:254)
    at
org.apache.catalina.util.LifecycleSupport Source code of org.apache.catalina.util.LifecycleSupport(LifecycleSupport
.java:166)
    at org.apache.catalina.core.StandardContext Source code of org.apache.catalina.core.StandardContext(StandardContext.java
:4212)
    at
org.apache.catalina.core.ContainerBase Source code of org.apache.catalina.core.ContainerBase(ContainerBase.java:866)
    at org.apache.catalina.core.ContainerBase Source code of org.apache.catalina.core.ContainerBase(ContainerBase.java:850)
    at org.apache.catalina.core.StandardHost Source code of org.apache.catalina.core.StandardHost(StandardHost.java:633)
    at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java
:316)
    at org.apache.catalina.core.StandardHost Source code of org.apache.catalina.core.StandardHost(StandardHost.java:859)
    at
org.apache.catalina.startup.HostConfig Source code of org.apache.catalina.startup.HostConfig(HostConfig.java:723)
    at org.apache.catalina.startup.HostConfig Source code of org.apache.catalina.startup.HostConfig(HostConfig.java:473)
    at org.apache.catalina.startup.HostConfig Source code of org.apache.catalina.startup.HostConfig(HostConfig.java:1002)
    at org.apache.catalina.startup.HostConfig Source code of org.apache.catalina.startup.HostConfig(HostConfig.java
:393)
    at
org.apache.catalina.util.LifecycleSupport Source code of org.apache.catalina.util.LifecycleSupport(LifecycleSupport
.java:166)
    at org.apache.catalina.core.ContainerBase Source code of org.apache.catalina.core.ContainerBase(ContainerBase.java:1133)
    at org.apache.catalina.core.StandardHost Source code of org.apache.catalina.core.StandardHost(StandardHost.java:816)
    at org.apache.catalina.core.ContainerBase Source code of org.apache.catalina.core.ContainerBase(ContainerBase.java:1125)
    at org.apache.catalina.core.StandardEngine Source code of org.apache.catalina.core.StandardEngine(StandardEngine.java:518)
    at org.apache.catalina.core.StandardService Source code of org.apache.catalina.core.StandardService(StandardService.java:519)
    at org.apache.catalina.core.StandardServer Source code of org.apache.catalina.core.StandardServer(StandardServer.java:2343)
    at org.apache.catalina.startup.Catalina Source code of org.apache.catalina.startup.Catalina(Catalina.java:581)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
    at java.lang.reflect.Method Source code of java.lang.reflect.Method(Method.java:324)
    at org.apache.catalina.startup.Bootstrap Source code of org.apache.catalina.startup.Bootstrap(Bootstrap.java:297)
    at org.apache.catalina.startup.Bootstrap Source code of org.apache.catalina.startup.Bootstrap(Bootstrap.java:398)

What the hell is going on here? I DID specify a <url-pattern>!  What am I doing
wrong? Any help would be highly appreciated!

Thanks,
Patrick




-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)




©2008 junlu.com - Jax Systems, LLC, U.S.A.