You have to follow the exact order as specified in the DTD.  The xml parser 
is picky on this point.  Check the DTD and your web.xml file to make sure 
there aren't any elements before that should be after and so forth.

--David

On Wednesday 05 December 2001 05:53 pm, you wrote:
> Hi everyone,
>
> when defining filter-tags in my web.xml file I get the following error
> starting tc:
>
> Starting service Tomcat-Standalone
> Apache Tomcat/4.0.1
> PARSE error at line 9 column -1
> org.xml.sax.SAXParseException: Element "web-app" does not allow "filter"
> here.
>
> Why is that? A view into the dtd revealed that <filter> is a valid tag
> in <web-app>. I also looked up the example web.xml that comes with
> tomcat. The first tag after <web-app> is also <filter>. This is the
> web.xml I use:
>
>
>
> 01:<?xml version="1.0" encoding="ISO-8859-1"?>
> 02:
> 03:<!DOCTYPE web-app
> 04:    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
> 05:    "http://java.sun.com/dtd/web-app_2_3.dtd";>
> 06:
> 07:<web-app>
> 08:
> 09:<filter>
> 10:    <filter-name>RequestAnalyzer</filter-name>
> 11:
> 12:<filter-class>com.featureit.asf.webapp.filter.RequestAnalyzer</filter-cl
>ass> 13:</filter>
> 14:
> 15:<filter-mapping>
> 16:    <filter-name>RequestAnalyzer</filter-name>
> 17:    <url-pattern>/*</url-pattern>
> 18:</filter-mapping>
> 19:
> 20:<servlet>
> 21:   <servlet-name>webapp</servlet-name>
>
>     [...]
>
>
> Any help would be greatly appreciated. Thanx!
>
> Bye,
>  Levo.
>
>
>
>
>
>
>
>
>
>
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to