I have Tomcat 7 set up to work with mod_jk and AJP. I'm wondering if, on the Tomcat side, I can log the mod_jk (Apache side) outgoing port with the Tomcat request handler thread name in order to track end-to-end network traffic.

1 Answer 1


The remote port number is available to your application in the environment variable JK_REMOTE_PORT.

There's no corresponding JkRequestLogFormat string to log the remote port, but it can be logged in a standard Apache mod_log_config request log with %{remote}p in LogFormat.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.