You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by frederic barachant <pe...@io-labs.com> on 2001/03/06 15:13:39 UTC

Re: mod rewrite, RequestDispatcher and intercepting requests to t he server

Hello.
I also have the idea of doing this, and thought that we could make all accesses create a 404, simply
by having an empty site) then, by having all of them going to a servlet, you would do the first part. (interception)
By moving the http port of Apache to an other, we could, after rewriting, recreate the request, and
send it directly to it. There would be no collision problem.
The problem to achieve this is:
How to redirect 404 to a single servlet?


Re: mod rewrite, RequestDispatcher and intercepting requests to t he server

Posted by "Brett W. McCoy" <bm...@chapelperilous.net>.
On Tue, 6 Mar 2001, frederic barachant wrote:

> I also have the idea of doing this, and thought that we could make all accesses create a 404, simply
> by having an empty site) then, by having all of them going to a servlet, you would do the first part. (interception)
> By moving the http port of Apache to an other, we could, after rewriting, recreate the request, and
> send it directly to it. There would be no collision problem.
> The problem to achieve this is:
> How to redirect 404 to a single servlet?

You can use the <error-page> element in server.xml to map errors or
exceptions to the path of a resoruce in the web application.  See page 67
of the Servlet 2.2 spec.

-- Brett
				http://www.chapelperilous.net/~bmccoy/
------------------------------------------------------------------------
The Fifth Rule:
	You have taken yourself too seriously.