You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by "Hitesh Kr. Seth" <hi...@seranova.com> on 2000/01/31 14:29:58 UTC

Servlet Chaining in Tomcat

Greetings

Need some help with servlet chaining using Tomcat.
(earlier before the xml deployment descriptor for web applications
you would configure servlet.properties file to have
FirstServlet,SecondServlet

I tried the same with tomcat

     <servlet>
        <servlet-name>
            chain
        </servlet-name>
        <servlet-class>
            FirstServlet,SecondServlet
        </servlet-class>
    </servlet>

and it doesn't seem to work

I looked up the DTD Spec from Sun's Site
(http://java.sun.com/j2ee/dtds/web-app_2.2.dtd)
and the servlet tag doesn't seem to have anything special for Servlet
Chaining.

    <!ELEMENT servlet (icon?, servlet-name, display-name?, description?,
    (servlet-class|jsp-file), init-param*, load-on-startup?,
security-role-ref*)>

(Environment: JDK 1.2, Tomcat 3.0 Standalone, Windows NT 4.0SP4)

Am I missing something?

Best Regards

Hitesh Kr. Seth.


Re: Servlet Chaining in Tomcat

Posted by James Cook <ji...@iname.com>.
The servlet chaining that many web servers support, but is not dictated by
the spec can be achieved programmatically by using the RequestDispatcher
mechanism. For those people who *must* have it.

jim

----- Original Message -----
From: Stefano Mazzocchi <st...@apache.org>
To: <to...@jakarta.apache.org>
Sent: Monday, January 31, 2000 5:37 PM
Subject: Re: Servlet Chaining in Tomcat


> "Craig R. McClanahan" wrote:
> >
> > Tim Fox wrote:
> >
> > > Any plans to support it though?
> > >
> >
> > Not unless we have to (because of future changes to the servlet API).
There are
> > logical problems with trying to make a servlet into a filter, which was
never the
> > original design intent.  The folks who did the original implementation
of servlet
> > chaining in JWS came to the conclusion that there are major problems
with this
> > whole approach.
> >
> > That being said, there will undoubtedly be discussions about adding some
sort of
> > filtering capability in the next generation of the servlet API (to be
developed
> > under the recently released JSR).  I suspect that, if filtering is
implemented,
> > it will be through some new interface -- perhaps javax.servlet.Filter --
and not
> > with servlets themselves.
>
> I totally share Craig's point of view.
>
> --
> Stefano Mazzocchi      One must still have chaos in oneself to be
>                           able to give birth to a dancing star.
> <st...@apache.org>                             Friedrich Nietzsche
> --------------------------------------------------------------------
>  Come to the first official Apache Software Foundation Conference!
> ------------------------- http://ApacheCon.Com ---------------------
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>


Re: Servlet Chaining in Tomcat

Posted by Stefano Mazzocchi <st...@apache.org>.
"Craig R. McClanahan" wrote:
> 
> Tim Fox wrote:
> 
> > Any plans to support it though?
> >
> 
> Not unless we have to (because of future changes to the servlet API).  There are
> logical problems with trying to make a servlet into a filter, which was never the
> original design intent.  The folks who did the original implementation of servlet
> chaining in JWS came to the conclusion that there are major problems with this
> whole approach.
> 
> That being said, there will undoubtedly be discussions about adding some sort of
> filtering capability in the next generation of the servlet API (to be developed
> under the recently released JSR).  I suspect that, if filtering is implemented,
> it will be through some new interface -- perhaps javax.servlet.Filter -- and not
> with servlets themselves.

I totally share Craig's point of view.

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Come to the first official Apache Software Foundation Conference!  
------------------------- http://ApacheCon.Com ---------------------



Re: Servlet Chaining in Tomcat

Posted by "Craig R. McClanahan" <cm...@mytownnet.com>.
Tim Fox wrote:

> Any plans to support it though?
>

Not unless we have to (because of future changes to the servlet API).  There are
logical problems with trying to make a servlet into a filter, which was never the
original design intent.  The folks who did the original implementation of servlet
chaining in JWS came to the conclusion that there are major problems with this
whole approach.

That being said, there will undoubtedly be discussions about adding some sort of
filtering capability in the next generation of the servlet API (to be developed
under the recently released JSR).  I suspect that, if filtering is implemented,
it will be through some new interface -- perhaps javax.servlet.Filter -- and not
with servlets themselves.

Craig



Re: Servlet Chaining in Tomcat

Posted by Tim Fox <ti...@hyperlink.com>.
Any plans to support it though?

"Craig R. McClanahan" wrote:

> "Hitesh Kr. Seth" wrote:
>
> > Greetings
> >
> > Need some help with servlet chaining using Tomcat.
> > (earlier before the xml deployment descriptor for web applications
> > you would configure servlet.properties file to have
> > FirstServlet,SecondServlet
> >
> > I tried the same with tomcat
> >
> >      <servlet>
> >         <servlet-name>
> >             chain
> >         </servlet-name>
> >         <servlet-class>
> >             FirstServlet,SecondServlet
> >         </servlet-class>
> >     </servlet>
> >
> > and it doesn't seem to work
> >
> > I looked up the DTD Spec from Sun's Site
> > (http://java.sun.com/j2ee/dtds/web-app_2.2.dtd)
> > and the servlet tag doesn't seem to have anything special for Servlet
> > Chaining.
> >
> >     <!ELEMENT servlet (icon?, servlet-name, display-name?, description?,
> >     (servlet-class|jsp-file), init-param*, load-on-startup?,
> > security-role-ref*)>
> >
> > (Environment: JDK 1.2, Tomcat 3.0 Standalone, Windows NT 4.0SP4)
> >
> > Am I missing something?
> >
>
> Yes ... servlet chaining is *not* a requirement of the servlet API
> specification.  It is a feature of some particular servlet engines.  Tomcat
> does not support it.
>
> >
> > Best Regards
> >
> > Hitesh Kr. Seth.
> >
>
> Craig McClanahan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org

--
Tim Fox (¦¬o)

Hyperlink plc
http://hyperlink.com

email: timf@hyperlink.com
phone: +44 (0) 207 240 8121



Re: Servlet Chaining in Tomcat

Posted by "Craig R. McClanahan" <cm...@mytownnet.com>.
"Hitesh Kr. Seth" wrote:

> Greetings
>
> Need some help with servlet chaining using Tomcat.
> (earlier before the xml deployment descriptor for web applications
> you would configure servlet.properties file to have
> FirstServlet,SecondServlet
>
> I tried the same with tomcat
>
>      <servlet>
>         <servlet-name>
>             chain
>         </servlet-name>
>         <servlet-class>
>             FirstServlet,SecondServlet
>         </servlet-class>
>     </servlet>
>
> and it doesn't seem to work
>
> I looked up the DTD Spec from Sun's Site
> (http://java.sun.com/j2ee/dtds/web-app_2.2.dtd)
> and the servlet tag doesn't seem to have anything special for Servlet
> Chaining.
>
>     <!ELEMENT servlet (icon?, servlet-name, display-name?, description?,
>     (servlet-class|jsp-file), init-param*, load-on-startup?,
> security-role-ref*)>
>
> (Environment: JDK 1.2, Tomcat 3.0 Standalone, Windows NT 4.0SP4)
>
> Am I missing something?
>

Yes ... servlet chaining is *not* a requirement of the servlet API
specification.  It is a feature of some particular servlet engines.  Tomcat
does not support it.

>
> Best Regards
>
> Hitesh Kr. Seth.
>

Craig McClanahan