================================================================================ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.

See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================================================ $Id: RUNNING.txt 896899 2010-01-07 15:05:58Z kkolinko $ =================================================== Running The Apache Tomcat 6.0 Servlet/JSP Container =================================================== Apache Tomcat 6.0 requires the Java 2 Standard Edition Runtime Environment (JRE) version 5.0 or later. ============================= Running With JRE 5.0 Or Later ============================= (1) Download and Install the J2SE Runtime Environment (JRE) (1.1) Download the Java 2 Standard Edition Runtime Environment (JRE), release version 5.0 or later, from http://java.sun.com/j2se. (1.2) Install the JRE according to the instructions included with the release. (1.3) Set an environment variable named JRE_HOME to the pathname of the directory into which you installed the JRE, e.g. c:\jre5.0 or /usr/local/java/jre5.0. NOTE: You may also use the full JDK rather than just the JRE. In this case set your JAVA_HOME environment variable to the pathname of the directory into which you installed the JDK, e.g. c:\j2sdk5.0 or /usr/local/java/j2sdk5.0. (2) Download and Install the Tomcat Binary Distribution NOTE: As an alternative to downloading a binary distribution, you can create your own from the Tomcat source repository, as described in "BUILDING.txt". If you do this, the value to use for "${catalina.home}" will be the "dist" subdirectory of your source distribution. (2.1) Download a binary distribution of Tomcat from: http://tomcat.apache.org (2.2) Unpack the binary distribution into a convenient location so that the distribution resides in its own directory (conventionally named

bat (windows) and tomcat-juli. When you use $CATALINA_BASE. (3) Start Up Tomcat (3.Only setenv. setenv.sh (Windows) (Unix) (3.sh (Windows) (Unix) ================================================== Advanced Configuration . For the purposes of the remainder of this doc ument. as well as on the Tomcat web site: http://tomcat.Directory used by the JVM for temporary files (java.jar * conf .org (4) Shut Down Tomcat (4.tmpdir) Note that by default Tomcat will first try to load classes and JARs from .1) Tomcat can be shut down by executing the following command: $CATALINA_HOME\bin\shutdown $CATALINA_HOME/bin/shutdown. it is desirable to have a single copy of a Tomcat binary distribution shared among multiple users on the same server."apache-tomcat-[version]").xml) * logs .apache.3) Further information about configuring and running Tomcat can be found in the documentation included here.2) After startup. To make this possible.io.Automatically loaded web applications * work .Log and output files * webapps .sh (*nix).Temporary working directories for web applications * temp . Tomcat will calculate all relative references for files in the following directories based on the value of $CATALINA_BASE instead of $CATALINA_HOME: * bin .1) Tomcat can be started by executing the following commands: $CATALINA_HOME\bin\startup.Multiple Tomcat Instances ================================================== In many circumstances.Server configuration files (including server. you can set the $CATALINA_BASE environment variable to the directory that contains the files for your 'personal' Tomcat instance.bat $CATALINA_HOME/bin/startup. the default web applications included with Tomcat will be available by visiting: http://localhost:8080/ (3. the symbolic name "$CATALINA_HOME" is used to refer to the full pathname of the release directory.

.xml and search for '8080'. For example. After you click apply. If you do not set $CATALINA_BASE. You can place instance specific JARs and classes (e. JDBC drivers) in $CATALINA_BASE/lib whilst keeping the standard Tomcat JARs in $CATALINA_HOME/lib. For the "Initial environment" field . ================ Troubleshooting ================ There are only really 3 things likely to go wrong during the stand-alone Tomcat install: (1) The most common hiccup is when another web server (or any process for that matter) has laid claim to port 8080. $CATALINA_BASE will default to the same value as $CATALINA_HOME. Tools -> Internet Options -> Connections -> LAN Settings. or ME operating systems. In Netscape. you would request the URL http://localhost:1977/ in your browse r. and in Internet Explorer. Restart Tomcat and you're in business. which means that the same directory is used for all relative path resolutions. This is the default HTTP port that Tomcat attempts to bind to at startup. (2) An "out of environment space" error when running the batch files in Windows 95. Windows will create shortcuts which you can use to start and stop the container. then on the "Memory" tab.BAT and SHUTDOWN. open the file: $CATALINA_HOME/conf/server. enter in something like 4096. 98. as ports less than or equal to 1024 require superuser access to bind under UNIX. Change it to a port that isn't in use. if you change the port to 1977. This could happen if you're behind a proxy. make sure the proxy configuration for your browser knows that you shouldn't be going through the proxy to access the "localhost". Right-click on the STARTUP. If that's the case. this is under Edit/Preferences -> Advanced/Proxies. (3) The 'localhost' machine isn't found. Be sure that you replace the "8080" in the URL you're using to access Tomcat. To change this.BAT files.$CATALINA_BASE/lib and then $CATALINA_HOME/lib. Click on "Properties". and is greater than 1024.g.

Sign up to vote on this title
UsefulNot useful