There are only 3 things likely to go wrong during a stand-alone Tomcat installation
In my previous article
the Tomcat installation for single user. It is good
if you run Tomcat server on your very own machine. But now days when
computers are so powerful, we often share an application amongst many users.
How do we install
one Tomcat server to share it between many users?
Normally after installation of Tomcat
for single user you get such directory structure under $CATALINA_HOME
bin - contains startup and binary files
common - contains all the external libraries which are used by Tomcat, not
Tomcat classes here, look at server directory
conf - all major configuration files are here
logs - here you find "famous" catalina.out log file and saved previous
catalina.out and more logs, like manager.log, admin.log, host-manager.log
server - here Tomcat class files, packed in jar files and plus configuration
for host-manager and manager. Who are that? Read later
shared - here shared classes should be
temp - place for some temp things... Do not know exactly what is it.
machine bugzilla37035-safeToDelete.tmp file with 0 bytes length here.
webapps - place where your web applications are/will be.
work - here Tomcat will place class files after the compilation. As you
Tomcat compiles first JSP pages into servlet java code and
then compiles them into
class files. That's why it names servlet container,
not JSP container
Now when you got an overview on Tomcat structure we are ready to go
Tomcat has the variable $CATALINA_BASE which is in case of single user is
equal to $CATALINA_HOME. Just add the argument
"-Dcatalina.base=$CATALINA_BASE" to startup file and
variable must contain files for 'personal' Tomcat instance.
As you can probably assume sharing Tomcat between multiple users requires
that every use can have own configuration and own applications.
Usage of this argument will force Tomcat to use relative references for
files in the following directories based
on the value of $CATALINA_BASE instead of $CATALINA_HOME:
* conf - Server configuration files (including server.xml)
* logs - Log and output files
* shared - For classes and resources that must be shared across all web
* webapps - Automatically loaded web applications
* work - Temporary working directories for web applications
* temp - Directory used by the JVM for temporary files (java.io.tmpdir)
Exactly what you need to get freedom and feel free from another guys
If you do not pass the "-Dcatalina.base=$CATALINA_BASE" argument to the
startup command, $CATALINA_BASE will default to the same value as
which means that the same directory is used for all relative path
For troubleshooting of Tomcat server installation please look at
Troubleshooting section below
The administration and manager web applications, which are defined in the
$CATALINA_BASE/conf/Catalina/localhost/manager.xml files, will
not run in that configuration, unless either:
- The path specified in the docBase attribute of the Context element is made
absolute, and replaced respectively by $CATALINA_HOME/server/webapps/admin
- Both web applications are copied or moved to $CATALINA_BASE,
and the path specified in the docBase attribute of the Context
element is modified appropriately.
- Both web applications are disabled by removing
================There are only really 3 things likely to go wrong during the stand-alone
(1) The most common hiccup is when another web server (or any process for that
matter) has laid claim to port 8080. This is the default HTTP port that
Tomcat attempts to bind to at startup. To change this, open the file:
and search for '8080'. Change it to a port that isn't in use, and is
greater than 1024, as ports less than or equal to 1024 require superuser access to bind under UNIX.
Restart Tomcat and you're in business. Be sure that you replace the "8080"
in the URL you're using to access Tomcat. For example, if you change the
port to 1977, you would request the URL
http://localhost:1977/ in your browser.
(2) An "out of environment space" error when running the batch files in
Windows 95, 98, or ME operating systems.
Right-click on the STARTUP.BAT and SHUTDOWN.BAT files. Click on
"Properties", then on the "Memory" tab. For the "Initial environment" field,
enter in something like 4096.
After you click apply, Windows will create shortcuts which you can use
to start and stop the container.
(3) The 'localhost' machine isn't found. This could happen if you're behind a
proxy. If that's the case, make sure the proxy configuration for your
browser knows that you shouldn't be going through the proxy to access the
In Netscape, this is under Edit/Preferences -> Advanced/Proxies, and in
Internet Explorer, Tools -> Internet Options -> Connections -> LAN Settings.
Disclaimer: English is not native language for me and I
appreciate if you correct my errors in a friendly way