Does anybody know the current level of support for filters in Tomcat 4.0?
I have written a small filter to take the XML output from one of our
servlets, and then dependent on a parameter in the ServletRequest, use Xalan
to transform the XML to HTML, WML or VoxML as appropriate.
Unfortunately, I am completely unable to make Tomcat 4.0 chain the filter to
the Servlet, so all I am getting is raw XML rather than HTML etc.
My current web.xml looks like (excluding prolog)
<web-app>
<servlet>
<servlet-name>EchoServlet</servlet-name>
<servlet-class>uk.co.itouch.EchoServlet</servlet-class>
</servlet>
<filter>
<filter-name>EchoFilter</filter-name>
<filter-class>uk.co.itouch.EchoFilter</filter-class>
</filter>
<filter-mapping>
<servlet-name>EchoServlet</servlet-name>
<filter-name>EchoFilter</filter-name>
</filter-mapping>
</web-app>
What am I doing wrong? How do I make Tomcat chain the filter to a servlet?
Do I have to invoke the servlet in a special way?
Thanks
Martin