File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Integrating Tomcat 5 and Apache 2.2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Integrating Tomcat 5 and Apache 2.2" Watch "Integrating Tomcat 5 and Apache 2.2" New topic

Integrating Tomcat 5 and Apache 2.2

Mike London
Ranch Hand

Joined: Jul 12, 2002
Posts: 1130
Hello all,

After a quick search here, I didn't see a good example/resolution/tutorial on how to integrate Tomcat with Apache (mod_jk, etc.). Lots of postings, but no real answers to get people working (at least on the searches I did).

Is there a tutorial or good step-by-step that anyone has used successfully?

There's for example a "Pro Apache" book out there, but I don't know if it has anything on Tomcat/Apache integration.

Any links or suggestion would be appreciated.


- M
Tarun Yadav
Ranch Hand

Joined: Sep 20, 2007
Posts: 134
I tried this on three different occasions and finally got it to work the third after sitting down for an hour and a half without distractions and following instructions to the 't' and fiddling around a bit to get my settings right. Unfortunately, I don't remember what all caused my earlier attempts to mess up but I did note that your installation path to Tomcat needs to be without spaces. I'm assuming that it would ideally be at the root of a drive, say something like "e:\Tomcat" to avoid any glitches.

Here's the two step-by-step guides I used.

I still have the configuration files for Apache so if you need I could post the lines I added so you can see if you're missing something.

Also, I had some trouble locating the correct mod_jk connectors; you'll need to look around in the download archives on the Apache site, they're there somewhere.

P.S. I'm running Win XP SP2 and I used Tomcat 5.5 and Apache 2.2 ( not absolutely sure, only installed it to try this out )

Good Luck!
Mike London
Ranch Hand

Joined: Jul 12, 2002
Posts: 1130
Thanks for your reply.

I went to the first article, but the very first step didn't work.

I tried to just put in the first connector code into Tomcat's server.xml. However, after putting this code in SERVER,XML (I tried both 'tomcat4' and 'tomcat5' in the org.apache.. line), Tomcat wouldn't even start.

<Connector className="org.apache.ajp.tomcat5.Ajp13Connector"
port="8009" minProcessors="5" maxProcessors="75"
acceptCount="10" debug="0"/>


Look forward to any suggestions on what to try next.

-- M
I agree. Here's the link:
subject: Integrating Tomcat 5 and Apache 2.2
It's not a secret anymore!