aw at ice-sa
Jun 2, 2011, 3:47 AM
Kim Goldov wrote:
> Thanks everyone. Here is what I ended up with.
> In my PerlHeaderParserHandler:
> $r->subprocess_env(AA_MYVAR => 'myvalue');
> In jk.conf:
> JkEnvVar AA_MYVAR
> In Tomcat:
> out.println("AA_MYVAR is: " + request.getAttribute("AA_MYVAR") );
But don't forget that this is very Apache/mod_jk/Tomcat specific.
A more generic way of doing this would be to set an additional header in the request at
the Apache level, and get this header at the Tomcat level with request.getHeader().
That would work with any proxying scheme between Apache and a back-end servlet engine
(mod_jk, but also mod_proxy_http and mod_proxy_ajp).