You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de> on 2007/09/25 11:53:46 UTC

mod_jk and mod_perl combined - how to stack location handlers?

Hi.

I am using mod_perl to register an output request filter for certain 
locations.
I've tested all with mod_proxy_ajp and it works like expected.

Now i have to connect apache <-> tomcat with mod_jk - but thats not that easy 
as i thought.
mod_jk registers the same way for Locations like mod_perl does.
Can i register "2" handlers or how can i solve this problem?

I want to filter the output from mod_jk (SetHandler jakarte-servlet) - but i 
cannot set both in apache configuration file?
Is there a way to get this working or should i stay with mod_proxy_ajp because 
it cannot be solved otherwise?

Torsten

Re: mod_jk and mod_perl combined - how to stack location handlers?

Posted by Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de>.
Am Dienstag, 25. September 2007 schrieb Torsten Krah:
> Am Dienstag, 25. September 2007 schrieben Sie:
> > On 9/25/07, Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de> wrote:
> > > mod_jk registers the same way for Locations like mod_perl does.
> > > Can i register "2" handlers or how can i solve this problem?
> > >
> > > I want to filter the output from mod_jk (SetHandler jakarte-servlet) -
> > > but i cannot set both in apache configuration file?
> >
> > Are you saying mod_jk is an output filter?  If you want to filter its
> > output, your mod_perl code should be an output filter.
> >
> > - Perrin
>
> Hm - to clarify things - heres my configuration:
>
>
> <Location /ApacheFilterProjekt/>
>     SetHandler modperl
>     PerlOutputFilterHandler MMS::HideRedirectURI::handler
> </Location>
>
> This is the "way" me is registering my output filter.
>
> If i use mod_jk - i can register it with SetHandler jakarta-servlet or via
> JkMount /URI (as told by
> http://tomcat.apache.org/connectors-doc/reference/apache.html).
>
> If i do it the first way, my OutputFilter does not get invoked - if i do it
> the second way mod_jk doesn't get invoked.
>
> Did i register the filter in a wrong way? Or can it be done otherwise?
>
> Torsten

Hm forget about - it seems so easy.
I followed the examples in the filter docs and let "SetHandler" there - i can 
remove it without any harm and the filter gets called.

Sorry for "noise".

Torsten

Re: mod_jk and mod_perl combined - how to stack location handlers?

Posted by Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de>.
Am Dienstag, 25. September 2007 schrieben Sie:
> On 9/25/07, Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de> wrote:
> > mod_jk registers the same way for Locations like mod_perl does.
> > Can i register "2" handlers or how can i solve this problem?
> >
> > I want to filter the output from mod_jk (SetHandler jakarte-servlet) -
> > but i cannot set both in apache configuration file?
>
> Are you saying mod_jk is an output filter?  If you want to filter its
> output, your mod_perl code should be an output filter.
>
> - Perrin

Hm - to clarify things - heres my configuration:


<Location /ApacheFilterProjekt/>
    SetHandler modperl
    PerlOutputFilterHandler MMS::HideRedirectURI::handler
</Location>

This is the "way" me is registering my output filter.

If i use mod_jk - i can register it with SetHandler jakarta-servlet or via 
JkMount /URI (as told by 
http://tomcat.apache.org/connectors-doc/reference/apache.html).

If i do it the first way, my OutputFilter does not get invoked - if i do it 
the second way mod_jk doesn't get invoked.

Did i register the filter in a wrong way? Or can it be done otherwise?

Torsten

Re: mod_jk and mod_perl combined - how to stack location handlers?

Posted by Perrin Harkins <pe...@elem.com>.
On 9/25/07, Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de> wrote:
> mod_jk registers the same way for Locations like mod_perl does.
> Can i register "2" handlers or how can i solve this problem?
>
> I want to filter the output from mod_jk (SetHandler jakarte-servlet) - but i
> cannot set both in apache configuration file?

Are you saying mod_jk is an output filter?  If you want to filter its
output, your mod_perl code should be an output filter.

- Perrin