James,

> >          ap_set_module_config(r->request_config, &webapp_module, appl);
>
>I had a look at this, it's only setting the application to use, not the path.

Yes, but (wa_application *)appl->rpth  is being compared to (request_rec 
*)r->uri, so I'm guessing that rpth is the rewritten version of uri, and 
that once the application is set, there's essentially nothing more that can 
be done about it.

> > I essentially moved this bit to wam_invoke() which happens last when the
> > request is actually serviced.
>
>Quite right, no disrespect but the url rewriting stage isn't the right stage
>in Apache's handling cycle
>to put this sort of thing, especially when it returns OK without letting the
>'proper' rewriters have a look.

I'm glad I'm not the only one that's been put off by mod_webapp's design, 
but I still have to hand it to the Tomcat Open Source developers for all 
their hard work.  On the other hand, you're right about mod_webapp's 
non-conformance, and as users we really shouldn't be forced to hack Apache 
modules to make them work with each other. I wonder what it would take to 
at least interest these folks in adding an optional parameter in 
httpd.conf, e.g.:

         WebAppConnection warp8888 warp localhost:8888 compatible=Apache|Sun

You seem to know a bit more about Apache module development than me;  Would 
you like to broach the subject with them, or shall I?

Dan


At 06:18 PM 3/15/02 +0000, James Williamson wrote:
> > In httpd.conf, are you doing a redirect [R] or a passthrough [PT] ?
>
>I'm guess I'm using RewriteRule (I'll read the docs now), which tells me
>this:
>
>192.168.0.101 - - [15/Mar/2002:18:06:36+0000]
>[www.nameonthe.net/sid#80cd06c][rid#811d54c/initi
>al] (2) init rewrite engine with requested uri /
>192.168.0.101  - - [15/Mar/2002:18:06:36 +0000]
>[www.nameonthe.net/sid#80cd06c][rid#811d54c/initi
>al] (3) applying pattern '^/$' to uri '/'
>192.168.0.101  - - [15/Mar/2002:18:06:36 +0000]
>[www.nameonthe.net/sid#80cd06c][rid#811d54c/initi
>al] (2) rewrite / -> /index.jsp
>
>Yet tomcat's logs show me this:
>
>2002-03-15 18:06:36 StandardContext[]: Mapping contextPath='' with
>requestURI='/' and relativeURI=
>'/'
>
> >
> > Assuming you're not explicitly redirecting the request, you should
>probably
> > check your modifications to whichever tomcat module you're using in
>Apache.
> > The thing to look, I think, is which URI is being set into the request
> > structure.  The mod_webapp module does this early on in wam_match() before
> > mod_rewrite has a chance to do its work:
> >
> >          ap_set_module_config(r->request_config, &webapp_module, appl);
>
>I had a look at this, it's only setting the application to use, not the
>path.
>
> >
> > I essentially moved this bit to wam_invoke() which happens last when the
> > request is actually serviced.
>
>Quite right, no disrespect but the url rewriting stage isn't the right stage
>in Apache's handling cycle
>to put this sort of thing, especially when it returns OK without letting the
>'proper' rewriters have a look.
>
> >
> > I'm not one of the developers on this project, so I'm guessing here and
> > there.  It would probably be worth running your modifications by the
> > tomcat-dev mailing list or Pier Fumagalli ([EMAIL PROTECTED]) who's
>name
> > is on the webapp.c module, if they have time to listen.  My impression is
> > that this group of developers decided to explicitly over-ride mod_rewrite
> > because they thought this would result in a truer implementation of Sun's
> > servlet API.
>
>Hmm, I think that's being charitable...


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to