home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-tomcat-addon-1.4.9-installer.exe / RUNNING.txt < prev    next >
Encoding:
Text File  |  2004-08-28  |  5.9 KB  |  145 lines

  1. $Id: RUNNING.txt,v 1.6 2004/06/17 22:28:55 markt Exp $
  2.  
  3.  
  4.                  Running The Tomcat 5 Servlet/JSP Container
  5.                  ==========================================
  6.  
  7. This subproject contains Tomcat 5, a server that implements the Servlet 2.4
  8. and JSP 2.0 specifications from the Java Community Process
  9. <http://www.jcp.org/>.  In order to install and run this container, you must do
  10. the following:
  11.  
  12.  
  13. (0) Download and Install a Java Development Kit
  14.  
  15. * Download a Java Development Kit (JDK) release (version 1.3 or later) from:
  16.  
  17.     http://java.sun.com/j2se/
  18.  
  19. * Install the JDK according to the instructions included with the release.
  20.  
  21. * Set an environment variable JAVA_HOME to the pathname of the directory
  22.   into which you installed the JDK release.
  23.  
  24.  
  25. (1) Download and Install the Tomcat 5 Binary Distribution
  26.  
  27. NOTE:  As an alternative to downloading a binary distribution, you can create
  28. your own from the Tomcat source repository, as described in "BUILDING.txt".
  29. If you do this, the value to use for "${catalina.home}" will be the "dist"
  30. subdirectory of your source distribution.
  31.  
  32. * Download a binary distribution of Tomcat from:
  33.  
  34.     http://jakarta.apache.org/site/binindex.cgi
  35.  
  36. * Unpack the binary distribution into a convenient location so that the
  37.   distribution resides in its own directory (conventionally named
  38.   "jakarta-tomcat-5").  For the purposes of the remainder of this document,
  39.   the symbolic name "$CATALINA_HOME" is used to refer to the full
  40.   pathname of the release directory.
  41.  
  42.  
  43. (2) Start Up Tomcat 5
  44.  
  45. Tomcat 5 can be started by executing the following commands:
  46.  
  47.       $CATALINA_HOME\bin\startup.bat          (Windows)
  48.  
  49.       $CATALINA_HOME/bin/startup.sh           (Unix)
  50.  
  51. After startup, the default web applications included with Tomcat 5 will be
  52. available by visiting:
  53.  
  54.     http://localhost:8080/
  55.  
  56. Further information about configuring and running Tomcat 5 can be found in
  57. the documentation included here, as well as on the Tomcat web site:
  58.  
  59.     http://jakarta.apache.org/tomcat/
  60.  
  61.  
  62. (3) Shut Down Tomcat 5
  63.  
  64. Tomcat 5 can be shut down by executing the following command:
  65.  
  66.       $CATALINA_HOME\bin\shutdown            (Windows)
  67.  
  68.       $CATALINA_HOME/bin/shutdown.sh         (Unix)
  69.  
  70.  
  71. (4) Advanced Configuration - Multiple Tomcat 5 Instances
  72.  
  73. In many circumstances, it is desirable to have a single copy of a Tomcat 5
  74. binary distribution shared among multiple users on the same server.  To make
  75. this possible, you can pass a "-Dcatalina.base=$CATALINA_BASE" argument when
  76. executing the startup command (see (2)). In this
  77. "-Dcatalina.base=$CATALINA_BASE" argument, replace $CATALINA_BASE with the
  78. directory that contains the files for your 'personal' Tomcat 5 instance.
  79.  
  80. When you use this "-Dcatalina.base=$CATALINA_BASE" argument, Tomcat 5 will
  81. calculate all relative references for files in the following directories based
  82. on the value of $CATALINA_BASE instead of $CATALINA_HOME    :
  83.  
  84. * conf - Server configuration files (including server.xml)
  85.  
  86. * logs - Log and output files
  87.  
  88. * shared - For classes and resources that must be shared across all web
  89.            applications
  90.  
  91. * webapps - Automatically loaded web applications
  92.  
  93. * work - Temporary working directories for web applications
  94.  
  95. * temp - Directory used by the JVM for temporary files (java.io.tmpdir)
  96.  
  97. If you do not pass the "-Dcatalina.base=$CATALINA_BASE" argument to the startup command, $CATALINA_BASE will default to the same value as $CATALINA_HOME (which means that the same directory is used for all relative path resolutions).
  98.  
  99. The administration and manager web applications, which are defined in the
  100. $CATALINA_BASE/conf/Catalina/localhost/admin.xml and $CATALINA_BASE/conf/Catalina/localhost/manager.xml files, will
  101. not run in that configuration, unless either:
  102. - The path specified in the docBase attribute of the Context element is made
  103.   absolute, and replaced respectively by $CATALINA_HOME/server/webapps/admin
  104.   and $CATALINA_HOME/server/webapps/manager
  105. - 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.
  106. - Both web applications are disabled by removing $CATALINA_BASE/conf/Catalina/localhost/admin.xml
  107.   and $CATALINA_BASE/conf/Catalina/localhost/manager.xml
  108.  
  109.  
  110. (5) Troubleshooting:
  111.  
  112. There are only really 3 things likely to go wrong during the stand-alone
  113. Tomcat 5 install:
  114.  
  115. 1) The most common hiccup is when another web server (or any process for that
  116.    matter) has laid claim to port 8080.  This is the default HTTP port that
  117.    Tomcat attempts to bind to at startup.  To change this, open the file:
  118.  
  119.        $CATALINA_HOME/conf/server.xml
  120.  
  121.    and search for '8080'.  Change it to a port that isn't in use, and is
  122.    greater than 1024, as ports less than or equal to 1024 require superuser
  123.    access to bind under UNIX.
  124.  
  125.    Restart Tomcat and you're in business.  Be sure that you replace the "8080"
  126.    in the URL you're using to access Tomcat.  For example, if you change the
  127.    port to 1977, you would request the URL http://localhost:1977/ in your browser.
  128.  
  129. 2) An "out of environment space" error when running the batch files in
  130.    Windows 95, 98, or ME operating systems.
  131.  
  132.    Right-click on the STARTUP.BAT and SHUTDOWN.BAT files.  Click on
  133.    "Properties", then on the "Memory" tab.  For the "Initial environment" field,
  134.    enter in something like 4096.
  135.  
  136.    After you click apply, Windows will create shortcuts which you can use to start and stop the container.
  137.  
  138. 3) The 'localhost' machine isn't found.  This could happen if you're behind a
  139.    proxy.  If that's the case, make sure the proxy configuration for your
  140.    browser knows that you shouldn't be going through the proxy to access the
  141.    "localhost".
  142.  
  143.    In Netscape, this is under Edit/Preferences -> Advanced/Proxies, and in
  144.    Internet Explorer, Tools -> Internet Options -> Connections -> LAN Settings.
  145.