tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: mod_rewrite Interceptor - feedback please!!
Date Thu, 14 Sep 2000 01:04:02 GMT

Before another war starts ( as this is definely not compliant with the
servlet spec - even worse than the case-sensitive problem ), can you tell
me how does Apache pass this information ?

What you do is a "special" mapping, common in Apache, IIS, NES ( and web
server ) world, but illegal in servlets. That probably
means it will never be enabled by default ( I hope we'll find a way to
check in all the contributed interceptors - in a contrib/ directory for

Let me know how I can help, as I would like this problem
resolved. Fact  is that servlet API define a ( maybe perfect ) set of
mapping rules and all other servers use a ( maybe completely stupid
) different set of rules, and as long as Apache and other web server will
persist in mistake and implement the "wrong" mappings they
implemented for years, we'll have to have a way to  deal with that. 


> > 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
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message