The getLocalAddr() method returns null when using mod_jk. I've tried with both mod_jk version 1.2.28 and 1.2.30.
Paul, can you reproduce this with a test case? If so please attach and I will be happy to take a look at it for you. RGS SY
Created attachment 26262 [details] simple servlet to test getLocalAddr()
Hi Steven, I've encountered the same problem on iis 7.0 with isapi_Redirect 1.2.31 and i was able to reproduce the issue with mod_jk 1.2.30 with apache 2.2 both in tomcata 5.5 and 6.0. I'm not familiar with the test case used with mod_jk so i write a simple servlet that echoes the getLocalAddr value. Is that enough or you need more? thanks andrea
I've tested mod_jk 1.2.30 with Jetty 7.2 and tomcat 7.0.4 and the problem does not occur anymore. in tomcat-6.0.29 i still have the issue
I proposed a fix for Tomcat 6. It is available at http://people.apache.org/~rjung/patches/bz48925-tc6-ajp-localaddr.patch It only happens for the default implementation of the AJP connector. If you switch to protocol="org.apache.coyote.ajp.AjpProtocol" in the connector configuration, it should be fine. That's the implementation used by Tomcat 7. Note also, that our implementation of localAddr() will simply return the same as localName(), so you can also switch to that method. Regards, Rainer
Patch applied in r1033643, will be part of Tomcat 6.0.30. No fix needed and no workaround available for mod_jk.