tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joachim Schaaf ...@pzwo.de>
Subject Embedding Tomcat
Date Tue, 22 Aug 2000 09:46:55 GMT
Hi,

I have embedded Tomcat (rel. 3.1) in my project and thought you might be
interested.

First, the project has the following directory layout:

etc/	- config. files
bin/	- start scripts
java/	- Java source
classes/	- compiled classes
web/	- web apps.

etc., not too complicated.

In the project's property file I have set the tomcat.home property to
../etc/tomcat. The config. files for Tomcat are in etc/tomcat/conf.
Because I think it's wrong to store html/jsp pages in a configuration directory
like etc/, I put the "web apps" into the web/ directory.

To start Tomcat, I simply called 
org.apache.tomcat.startup.Tomcat.main( new String[] {""} );

This works fine, but I had some problems with absolute and relative paths in
the server.xml file. Absolute paths and relative paths below of the webapps
directory worked, but a path like "../../myapp" didn't work. This is strange,
since a path like "../../log/tomcat/tomcat.log" in the same file worked.
To have my web apps outside the directory set with tomcat.home I have changed
it with the "home" property of the ContextManager inside server.xml
(home="../web"). 
So Tomcat has a different home directory after he has started ;))

Last question: how to get the port number? I have found some comments in the
mailing list archive, but I'm not really sure. Any comments?


Regards,
Joachim
--
Dipl.Ing. Joachim Schaaf | Projektleiter | http://PZwo.de/
Tel: +49.221.4851.807 | Fax: +49.221.4851.907 | Cel: +49.170.7667.807
IoS Gesellschaft für innovative Softwareentwicklung mbH
Eupener Straße 148 | 50933 Köln | Germany

+++ No ePatents in Europe: http://petition.eurolinux.org/ +++

Mime
View raw message