Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Jul 2000 13:43:56 EDT
From:      "John Daniels" <jmd526@hotmail.com>
To:        tomcat-usr@jakarta.apache.org, freebsd-java@freebsd.org
Subject:   tomcat + apache configuration
Message-ID:  <F227AfljdwggQJ0LJi500000cab@hotmail.com>

next in thread | raw e-mail | index | archive | help
Hi everyone:

The recommended test for a tomcat installation is to enter the following in 
a browser (I am using Netscape 4.73)

http://localhost:8080/examples

**** THIS WORKS! *****  but only when I run tomcat standalone.

When running with apache, there is a conflict with port 8080 since apache 
uses port 8080 for some things (I think documenation, etc), so I comment out 
the tomcat http "connector" in server.xml (tomcat is suppose to use the 
AJPV12 "connector" for web-server integration, anyway -- and this is 
recommended in the tomcat user guide)

Apache listens on port :80, but when I try:

               http://localhost:80/examples
or even,
               http://localhost:8080/examples

I get a "not found" error.


I'm running on FreeBSD 4.0-STABLE.  I have installed jdk1.2.2 and I have 
installed Apache 1.3.12 (with DSO) and I have installed tomcat 3.2-beta2 
(binary).

* I have verified that apache runs,

* I have compiled the mod_jserv.so from the tomcat 3.1 sources, and placed 
it in the correct directory,

* I have added "include /path/to/concat.conf" as the last line of 
httpd.conf,

* I defined JAVA_HOME and put the path to the tools.jar (i.e. 
/usr/local/jdk1.2.2/lib) in my PATH.

* I have started tomcat _before_ apache, (although I'm not sure that this is 
necessary since I am using the static config file)


I am using the tomcat.conf, server.xml and web.xml files that came with 
tomcat except for two minor and necessary modifiations:

* in tomcat.conf I needed to use the full path to mod_jserv.so

* in server.xml I needed to comment out the httpd connector which uses port 
8080 (apache uses the same port and was not starting while this was not 
commented out -- commenting this out is also recommended in the 
documentation)


I have also tried using the dynamicly generated file: tomcat-apache.conf 
(remembering to include the full path to mod_jserv.so), but this doesn't 
help.


When I start tomcat I get:

# ./startup.sh
Guessing TOMCAT_HOME from tomcat.sh to ./..
Setting TOMCAT_HOME to ./..
Using classpath: 
.:./../lib/ant.jar:./../lib/jasper.jar:./../lib/jaxp.jar:./../lib/parser.jar:./../lib/servlet.jar:./../lib/test:./../lib/webserver.jar:/usr/local/jdk1.2.2/lib/tools.jar
wirelessmeridian# 2000-07-29 11:35:24 - ContextManager: Adding context Ctx( 
/examples )
Starting tomcat. Check logs/tomcat.log for error messages
2000-07-29 11:35:24 - ContextManager: Adding context Ctx( /admin )
2000-07-29 11:35:24 - ContextManager: Adding context Ctx(  )
2000-07-29 11:35:24 - ContextManager: Adding context Ctx( /test )
2000-07-29 11:35:27 - PoolTcpConnector: Starting Ajp12ConnectionHandler on 
8007


The log files look like this:

$ cat jasper.log
2000-07-29 11:35:25 - Scratch dir for the JSP engine is: 
/usr/local/tomcat/work/localhost_8080%2Fexamples
2000-07-29 11:35:25 - IMPORTANT: Do not modify the generated servlets
$ cat servlet.log
2000-07-29 11:35:25 - path="/examples" :jsp: init
2000-07-29 11:35:26 - path="/admin" :jsp: init
2000-07-29 11:35:26 - path="" :jsp: init
2000-07-29 11:35:26 - path="/test" :jsp: init


What am I doing wrong in this configuration with Apache????
I have read and re-read the documentation and have even looked into some JSP 
books at the local bookstore to find some clues, but I can't seem to get 
tomcat to play nice with apache.

I'm sure lots of folks have done this already.  I would really, really 
appreciate a few hints.

Thanks,

John

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F227AfljdwggQJ0LJi500000cab>