perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rommel Sharma <rsharm...@sapient.com>
Subject RE: Intercepting and modifying response
Date Fri, 22 Jun 2012 07:55:57 GMT
Thanks All, using PerlOutputFilterHandler gives me the desired result for the pages in htdocs
for the <Location ...> specification..
[using the inputs from this group and http://www.gossamer-threads.com/lists/modperl/modperl/104437].

Now I am noting that my earlier integration of Apache with JBoss where I am redirecting based
on certain paths is not working. If I remove the output filter the jboss page shows, but when
I put it (httpd.conf) the display of dynamic content from Jboss stops. E.g. in mod-jk.conf:


JkMount /jspweb/* node1

What am I missing here? Many thanks for your inputs in advance!

Thanks,
Rommel.
-----Original Message-----
From: Dr James A Smith [mailto:js5@sanger.ac.uk] 
Sent: Saturday, June 16, 2012 10:54 PM
To: Rommel Sharma
Cc: mod_perl list
Subject: Re: Intercepting and modifying response

On 16/06/2012 14:22, Rommel Sharma wrote:
> Hi André,
> 
> Thanks for the reply. Details are below. 
> 
> Before that would like to mention - I am new to mod_perl usage and the setup is only
on my dev machine where I am testing the scenario described.
> Therefore  looking for the right directions from the experienced users in this group.
Sample code/reference to such would help very much.
> 
>> What is the connector module used between Apache httpd and JBOSS ? How is it configured
?
>> (more explicitly, how in the Apache httpd configuration, do you specify which requests
 that have to be passed to JBOSS, an which not ?)
> 
> Using mod_jk setup. (JkMount). 
> 
>> Define "adverse effects" ? mod_perl may allow you to modify the JBOSS response, if
it is possible to insert a mod_perl 
>> handler in the right place to modify the response coming from JBOSS, before it is
returned to the client.
> 
> By adverse effects I meant if I write a perl program that receives the response from
the jboss server, that does some pattern matching and replaces a few strings from each response
will it slow down the server significantly? Am I better off handling this in a servlet filter?
> 
> On mod_perl - some pointers to get started with such request intercepting will be great
as I have not worked with it before.
> 
> Many thanks well in advance for the much needed inputs!
> 
> Rommel.
> 
> -----Original Message-----
> From: André Warnier [mailto:aw@ice-sa.com] 
> Sent: Friday, June 15, 2012 8:19 PM
> To: mod_perl list
> Subject: Re: Intercepting and modifying response
> 
> Rommel Sharma wrote:
>  > All,
>  >
>  > I need to intercept and modify the response that is coming from JBOSS to the Apache
Web 
> (httpd) server and being returned to the client.
>  >
> 
> What is the connector module used between Apache httpd and JBOSS ? How is it configured
?
> (more explicitly, how in the Apache httpd configuration, do you specify which requests

> that have to be passed to JBOSS, an which not ?)
> 
>  > Planning to use perl to edit the response using mod_perl. Does mod_perl allow this
with 
> no adverse effects?
> 
> Define "adverse effects" ?
> mod_perl may allow you to modify the JBOSS reponse, if it is possible to insert a mod_perl

> handler in the right place to modify the response coming from JBOSS, before it is returned

> to the client.
> 
> If yes, then how do we go about it?
> 
> Maybe by remembering first that you are on a support list manned by volunteers, where

> being gracious helps getting answers.
> 

As others have pointed out this works as you are using mod_jk, look at
OutputFilters - we use output filters to "wrap/template" a number of our
websites.

By using this method we are able to wrap, static content, output from
other mod_perl handlers, php scripts, ruby scripts, output from others
servers - tomcat servers behind mod_jk other perl servers using
mod_proxy... All with a common method... not seen any "adverse" effects
with performance..

James


Mime
View raw message