tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <Craig.McClana...@eng.sun.com>
Subject Re: Servlet chaining in Tomcat
Date Wed, 22 Nov 2000 23:55:10 GMT
Rama Venkata Kunapuli wrote:

> Folks:
>
> I am trying to chain servlets so output of one is directed to next servlet.
>
> Lacking information, I have tried modifying web.xml and made the following
> entries -- ofcourse, it didn't work!
>
> <servlet>
>         <servlet-name>ServletChain</servlet-name>
>         <servlet-class>SimpleTextServlet,UpperCaseServlet</servlet-class>
>     </servlet>
>
>     <servlet-mapping>
>         <servlet-name>ServletChain</servlet-name>
>         <url-pattern>/cha</url-pattern>
>     </servlet-mapping>
>
> Output of SimpleTextServlet is supposed to go to UpperCaseServlet.
>
> Any suggestions on how to make this work ?
>

Servlet chaining is not supported by Tomcat, and is quite unlikely to ever be supported.
It is not in the servlet spec, so you will find that many servlet containers don't
support it, and some may support it in different ways.  As a programming technique,
servlet chaining is also fraught with problems.

The recommended approach (from a servlet API perspective) is to use the new Filter
capability that was added in Servlet 2.3 (and implemented in Tomcat 4.0).

>
> Thanks,
> Rk
>

Craig McClanahan



Mime
View raw message