tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: RequestDispatcher scenarios ( was RE: static url routing)
Date Wed, 11 Dec 2002 01:33:27 GMT


On Mon, 9 Dec 2002, RXZ JLo wrote:

> Date: Mon, 9 Dec 2002 03:21:25 -0800 (PST)
> From: RXZ JLo <rufoo2001@yahoo.com>
> Reply-To: Tomcat Users List <tomcat-user@jakarta.apache.org>
> To: Tomcat Users List <tomcat-user@jakarta.apache.org>
> Subject: RequestDispatcher scenarios ( was RE: static url routing)
>
>
> --- "Craig R. McClanahan" <craigmcc@apache.org> wrote:
> > To do a redirect filter, then, you'd examine the
> > request URI to determine
> > what kind of remapping is needed, and then do a
> > RequestDispatcher.forward() call to the remapped
> > resource name.  After the
> > forward returns (which means that the actual
> > response has been created),
> > simply return instead of calling chain.doFilter() to
> > pass the request on.
> >
>
> I am looking for various scenarios where
> RequestDispatcher is used. When I searched the list, I
> noticed that it can be used in a Servlet too. What
> then is the difference between using it in a Filter
> and using it in servlet? Can I just use it in the
> Servlet to serve my purpose(of serving static
> content)?
>

If you're serving your own static content with your own servlet, then you
could do this.  Using a Filter lets you use Tomcat's standard static file
serving servlet with no modifications.

> Thank you
> rf.

Craig



--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message