You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Keith Brady <kb...@newbay.com> on 2003/04/10 16:56:54 UTC

mod_jk2 order in ap_hook_translate_name

I've been trying to do some complicated stuff with mod_rewrite before
handing content off to mod_jk2 and thence to Tomcat.

Unfortunately, mod_jk2 adds itself to ap_hook_translate_name using the
option APR_HOOK_FIRST which puts it first on the list. This means that
it will pick up anything that matches one of its maps before mod_rewrite
sees them and that I can't use [PT] in mod_rewrite to pass content off
to mod_jk2.

Changing the source to APR_HOOK_LAST does the right thing but it seems
wrong to me to have to do this.

Is there a better way to achieve the same result?

-- 
Keith Brady
NewBay Software


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


Re: mod_jk2 order in ap_hook_translate_name

Posted by Keith Brady <kb...@newbay.com>.
> I think you could try to use <Location>JkUriSet </Location> for mappings,
> instead of workers.properties.

This is certainly a good way to use mod_jk2 in general but,
unfortunately, it doesn't work in my case (I've tested it to be sure). I
have a bunch of URLs prefixed with the context path ('/fb' in my basic
case) but mod_jk2 (or apache if I use <Location> grab them too early for
mod_rewrite to see them).

I guess I really should ask on tomcat-dev.

cheers,


-- 
Keith Brady
NewBay Software


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


Re: mod_jk2 order in ap_hook_translate_name

Posted by Costin Manolache <cm...@yahoo.com>.
Keith Brady wrote:

> I've been trying to do some complicated stuff with mod_rewrite before
> handing content off to mod_jk2 and thence to Tomcat.
> 
> Unfortunately, mod_jk2 adds itself to ap_hook_translate_name using the
> option APR_HOOK_FIRST which puts it first on the list. This means that
> it will pick up anything that matches one of its maps before mod_rewrite
> sees them and that I can't use [PT] in mod_rewrite to pass content off
> to mod_jk2.
> 
> Changing the source to APR_HOOK_LAST does the right thing but it seems
> wrong to me to have to do this.
> 
> Is there a better way to achieve the same result?

I think you could try to use <Location>JkUriSet </Location> for mappings,
instead of workers.properties.

This way translate() will not do the mapping.

I don't remember how it ended up as HOOK_FIRST - I looked in cvs history
and it seems that's how it was in the first checkin ( Dec 1, 2001... ).
At one point Mladen changed it to HOOK_MIDDLE - but it caused some 
problems and got reverted shortly after. ( at least from the cvs comments ).


Costin


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