Here are my notes on Tomcat 4 / Apache / MySQL / Netbeans / Mozilla...

Perhaps someone wants to tell me of a suitable place (on Jakarta?) to host
documents like this.


Chris

---------

1) Install Apache

Install Apache_1.3.22-win32-x86.exe (Windows Installer of latest stable
release) to c:\server\apache (actually places it in Apache subdirectory).
During installation select the "Run as Service for all Users" option.

Verify the installation in Control Panel / Services by checking for Apache.

2) Install MySQL

Install mysql-max-3.23.49-win.zip by unzipping and running setup.exe

Recommend installing to c:\server\mysql

Create c:\winnt\my.ini with the following contents:

[mysqld]
basedir=C:/projects/mysql
datadir=C:/projects/mysql/data

When you are done add c:\server\mysql\bin to the path environment variable.

You can get MySQL-Front from www.mysqlfront.de if you need a graphical front
end for the database.

Also available is MyODBC, which allows MySQL to be connected to by
applications utilising ODBC.


3) Install Java 2 Standard Edition 1.4

Run the J2SE installer, and choose to install to c:\Program Files\Java\J2SE.
Install all components and set it as a plugin for all browsers

Add the following to the PATH variable:

c:\Progra~1\J2SE\bin.
Install Tomcat 4.0.4 beta 1 LE
Download Tomcat 4.0.4 beta 1 LE (for JDK 1.4) and run the installer. Take
care to install Tomcat as a Service when offered the option by the
installer.

Set the following environment variables:

JAVA_HOME - c:\Progra~1\Java\J2SE
CATALINA_HOME - c:\Progra~1\Java\Tomcat
Integrate Tomcat and Apache
Stop the Tomcat and Apache services. Then download mod_webapp from
jakarta.apache.org. Extract libapr.dll to c:\winnt\system32. Also extract
libapr.dll and mod_webapp.so to c:\server\apache\modules.

Add the following lines to httpd.conf:

LoadModule webapp_module modules/mod_webapp.so
AddModule mod_webapp.c
You need to configure a connector in httpd.conf (examples shown for the
modules you can export initially - remove the comments to enable them):

<IfModule mod_webapp.c>
WebAppConnection warpConnection warp localhost:8008
WebAppInfo /webapp-info
#WebAppDeploy examples warpConnection /examples
#WebAppDeploy webdav warpConnection /webdav
</IfModule>
Before restarting Apache download Service+ from ActivePlus and use it to set
Apache as depending on Tomcat. Then restart Apache (Tomcat will restart
automatically).

4) Install JDBC Driver for MySQL

Download the MySQL JDBC driver.

Open the file (mm.mysql-2.0.11-you-must-unjar-me.jar) in WinZip and extract
mm.mysql-2.0.11-bin.jar and place it in c:\program
files\java\j2se\jre\lib\ext. It will now be automatically available to Java
programs, without needing to add it to the classpath.

5) Install Mozilla Plugin

Copy the np* files from C:\Program Files\Java\J2SE\jre\bin to C:\Program
Files\Mozilla\Plugins.

Restart Mozilla

6) Install NetBeans

Install NetBeans to c:\Program Files\Java\NetBeans. The installer will
automatically detect the JDK.

Netbeans can debug Tomcat, if you want to enable this first remove the
existing Tomcat Service:

net stop "Apache Tomcat"
c:\progra~1\java\tomcat\bin\tomcat.exe -uninstall "Apache Tomcat"
Next install the modified Tomcat service which is enabled for debugging:

Tomcat.exe -install "Apache Tomcat"
c:\progra~1\java\j2se\jre\bin\server\jvm.dll -Djava.class.path=c:\progra~1\j
ava\tomcat\bin\bootstrap.jar;c:\progra~1\java\tomcat\bin\servlet.jar;C:\Prog
ra~1\Java\J2SE\lib\tools.jar -Xint -Xdebug -Xnoagent -Xrunjdwp:transport=dt_
socket,server=y,address=12999,suspend=n -Dcatalina.home=c:\progra~1\java\tom
cat\ -start org.apache.catalina.startup.Bootstrap -params start -stop
org.apache.catalina.startup.Bootstrap -params stop -out
c:\progra~1\java\tomcat\logs\stdout.log -err
c:\progra~1\java\tomcat\logs\stderr.log
Make the service depend on MySQL as before

Once Tomcat has been restarted go to Netbeans, and select the Debug / Attach
menu. Seelect JPDA as the Debugger Type, Socket Attach, the hostname of the
machine Tomcat is on, and 12999 as the port. It is now possible to debug the
running Tomcat server.

To assist debugging mount the Tomcat Sources in the Netbeans explorer:

C:\Program Files\Java\J2SE\src
C:\Program Files\Java\Tomcat\src\catalina\src\share
C:\Program Files\Java\Tomcat\src\catalina\src\test
C:\Program Files\Java\Tomcat\src\jasper\src\share

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
On Behalf Of l.marot
Sent: 21 March 2002 08:08
To: Tomcat Users List
Subject: Tomcat 4.0 / Apache


I've been playing for several months with tomcat as a standalone server and
it works fine but i'd like now to make it work with apache.

I've heard a lot about difficulties using mod_webapp, mod_jk, mod_jserv....
could someone show me the right way ?

my conf : Apache 1.3.23 / tomacat 4.0 / Win2K


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to