tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glenn Nielsen <gl...@mail.more.net>
Subject Re: FW: mod_jk 1.2 Apache 2 hook priorities
Date Thu, 01 May 2003 19:32:40 GMT
I did some more review of mod_dir and mod_alias in 2.0.45.

mod_alias sets ap_hook_name_translate at priority MIDDLE
with an ap_hook_fixups at priority MIDDLE.

mod_dir sets ap_hook_fixups at priority LAST.

So we should be able to set mod_jk's ap_hook_name_translate
and ap_hook_handler at priority MIDDLE with mod_dir still able
to handle a DirectoryIndex of index.jsp. For mod_alias to run
before mod_jk with both of them at priority MIDDLE we will need
to specify the hook order so that mod_alias runs before mod_jk
as documented here:

http://httpd.apache.org/docs-2.0/developer/hooks.html#hooking

Looks like there have been some changes over time to the priority
and hooks for mod_dir.  It probably is a good thing to do a review
of mod_jk hook priorities against the most recent Apache 2 release
of mod_dir and mod_alias.

Regards,

Glenn

Mladen Turk wrote:
>>From: Glenn Nielsen
>>
>>Thanks for the explanation below about how it could impact 
>>use of index.jsp as a DirectoryIndex.  I will not commit the 
>>change at this time.  This will require some more thought on 
>>how to get the Alias config to work with mod_jk.
>>
> 
> 
> Actually I've tested all that using HOOK_MIDDLE, and it works (didn't
> for 2.0.39).
> 
> I've made a patch few months ago that used HOOK_MIDDLE (for jk2), but it
> didn't worked.
> The explanation I gave was why it was reverted.
> The Apache API says: "Modules that don't care when they are run should
> use HOOK_MIDDLE".
> 
> The question is are we really 'care'. This will need more tests, so IMO
> it should go to
> 1.2.4-dev.
>  
> 
> MT.
> 
> 
>>>The problem was with internal redirects, not serving jsp 
>>
>>files in the 
>>
>>>Apache directory tree. Look at the mod_proxy and 
>>
>>mod_rewrite. They all 
>>
>>>use the HOOK_FIRST for the same reason as we
>>>do. Since we are not dealing with the file system, the 
>>
>>famous file_walk
>>
>>>didn't run, so we need
>>>ensure that we are run before mod_dir.
>>>
>>>The easiest way to check if the mod_jk (and mod_jk2) hook 
>>
>>order change 
>>
>>>from HOOK_FIRST to HOOK_MIDDLE would break something is to set the 
>>>DirectoryIndex to include the jsp page (look at the bug 10789). 
>>>Perhaps Apache now deals with hooks differently.
>>>
>>
> 


-- 
----------------------------------------------------------------------
Glenn Nielsen             glenn@more.net | /* Spelin donut madder    |
MOREnet System Programming               |  * if iz ina coment.      |
Missouri Research and Education Network  |  */                       |
----------------------------------------------------------------------


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


Mime
View raw message