Christian Parpart wrote:
> Hi all
>
> how can I access a servlet wich is
> mapped to any *.xml file without giving him
> any prefix like /mywebapp?
>
> <servlet>
> <servlet-name>XmlFilter</servlet-name>
> <servlet-class>myServlets.xmlFilter.XmlFilter</servlet-class>
> </servlet>
> <servlet-mapping>
> <servlet-name>XmlFilter</servlet-name>
> <url-pattern>*.xml</url-pattern>
> </servlet-mapping>
>
> This should be accessable from every sub directory on my host.
>
> <Host name="www.myhost.org">
> <Context path=""
> docBase="C:/path/to/htdocs"
> debug="0" reloadable="true" trusted="true" >
> </Context>
> </Host>
>
> This data is stored in $tomcat/conf/web.xml, because I thought
> these information are available for all hosts defined in server.xml.
>
That was true in Tomcat 3.1 (and 4.0), but was changed in 3.2. You will need to
put your servlet and servlet-mapping definitions in the WEB-INF/web.xml file for
each application.
>
> But it doesn't work. Why and how should I define it?
>
> Thanks in advance,
>
> Christian Parpart
> SurakWare
> [EMAIL PROTECTED]
> http://www.surakware.com
Craig McClanahan