Meaningless Drivel is fun!
The moose likes Tomcat and the fly likes Integrating Tomcat with Apache Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Integrating Tomcat with Apache" Watch "Integrating Tomcat with Apache" New topic

Integrating Tomcat with Apache

Alan Shiers
Ranch Hand

Joined: Sep 24, 2003
Posts: 237
Hi there,

I'm trying to integrate Tomcat with Apache. The instructions I've seen repeatedly on the NET are as follows:

1. Download
jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz from

2. Uncompress it and extract the tar file.

3. cd to

4. chmod u+x configure

5. Run configure with:

./configure \
--with-apxs2=<apache-root-directory>/bin/apxs \
--with-tomcat41=<tomcat-root-directory> \
--with-java-home=<java-root-directory> \
--with-jni \

For example:

./configure --with-apxs2=/usr/local/apache/bin/apxs \
--with-tomcat41=/home/tomcat \
--with-java-home=/usr/java \
--with-jni \

6. Run make

7. The two .so files ( and will be


8. Copy those to files to
<apache-root-directory>/modules with the
proper permissions.

9. Configure Apache and Tomcat

10. Restart and enjoy

Well, I've managed to obtain the jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz file and uncompress it. However, I'm getting stuck on item 5:

5. Run configure with:

./configure \
--with-apxs2=<apache-root-directory>/bin/apxs \
--with-tomcat41=<tomcat-root-directory> \
--with-java-home=<java-root-directory> \
--with-jni \

I know the paths to tomcat and java but because I don't know the path to apache on Fedora Core 4, I am unable to provide one. When I run the configure without the line:
--with-apxs2=<apache-root-directory>/bin/apxs \
The whole configuration thing fails. I keep getting an error message saying:

no apxs given
no apache given
configure: error: Cannot find the WebServer

Obviously, I have to provide the path to the server and in many examples they site /usr/local/apache/bin/apxs as being the path. That is not the case on my machine! I did a complete search on my drive and didn't find a single directory named apxs.

What is the path supposed to be for the arguement: --with-apxs2=<apache-root-directory>/bin/apxs ???

I agree. Here's the link:
subject: Integrating Tomcat with Apache
It's not a secret anymore!