tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Bremford" <>
Subject RE: mod_rewrite Interceptor - feedback please!!
Date Wed, 13 Sep 2000 13:01:36 GMT
Hi Costin

> I'm not sure how it works - the original request URI is re-written by
> Apache, and you want the new request to be processed by tomcat?

Yup. The problem is that the servlet should see the **ORIGINAL URI**
requested by the user, not the rewritten one. Important for relative URIs,
for instance. This is the way both CGI and Apache/JServ work. The idea is
that I can hide the internal structure of my site from the user.

> In this case you just need to change the fields in Request
> probably both
> URI and servletPath.

This passes through the rewritten URI instead of the original (this is what
Resin does too, incidentally).

The main reason this is so tricky is that the URI is directly linked with
the filename - a layer of abstraction between them would make this a lot
easier. Either that or the ability to apply a chain of mappings, rather than
just one (eg. map x.jsp to y.jsp, which maps to the JSP servlet, but the URI
remains "x.jsp").

> Please don't change the Facade - you can change
> Request/Response if you
> want. The facade is supposed to have minimal functionality, and be as
> simple as possible ( and we'll likely have multiple facades - one for
> servlet 2.3 ).

Gotcha. I'll have a crack at the Request object and see how I go.

> > It's at
> Excelent - can I check it in ?

Knock yourself out ;-). I hope it's correct!

> Costin

Cheers (and thanks for the feedback!)... Mike

View raw message