- install jakarta-tomcat-4.1.24. download http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.1.24/bin/jakarta-tomcat-4.1.24.tar.gzand install it.
- installi httpd-2.0.47.tar.gz. download http://www.apache.org/dist/httpd/httpd-2.0.47.tar.gz and install it.
- go http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.1.24/src/, and download file jakarta-tomcat-connectors-4.1.24-src.tar.gz
- untar jakarta-tomcat-connectors-4.1.24-src.tar.gz
- go under jakarta-tomcat-connectors-4.1.24-src/util/, run “ant”
- go under jakarta-tomcat-connectors-4.1.24-src/coyote/, run “ant”
- go under jakarta-tomcat-connectors-4.1.24-src/http11/, run “ant”
- go under jakarta-tomcat-connectors-4.1.24-src/jk/, run “export CLASSPATH=/usr/local/jakarta-tomcat/common/lib/servlet.jar” and “ant”
- under jakarta-tomcat-connectors-4.1.24-src/jk/, edit build.xml, comment out the line ““, and run “ant native”. This will build .so files for apache2. (It mayfail, but all the necessary .so are built already.)
- copy jakarta-tomcat-connectors-4.1.24-src/jk/conf/workers2.properties to /usr/local/apache2/conf/, and add the following at the end in workser2.properties file:
[uri:/examples/jsp/*]
info=Example webapp in the default context.
context=/examples/jsp/*
debug=0[uri:/examples/servlets/*]
info=Example webapp in the default context.
context=/examples/servlets/*
debug=0 - copy jakarta-tomcat-connectors-4.1.24-src/jk/build/jk2/apache2/mod_jk2.so to /usr/local/apache2.0.46/modules/
- copy jakarta-tomcat-connectors-4.1.24-src/jk/build/jk2/jni/libjkjni.so to /usr/local/apache2.0.46/modules/
- edit /usr/local/apache2/conf/httpd.conf, add the line:
LoadModule jk2_module modules/mod_jk2.so
- start Tomcat and Apache, “apachectl -k restart”
- try with http://localhost/examples/, and make sure that jsp and servlet files are working
The jakarta-tomcat-connectors binary download doesn’t work as expected.So, I download the src and build myself.