Page tree
Skip to end of metadata
Go to start of metadata

Installing Tomcat

The first thing to note is that it's best not to install Tocmat down C:/Program Files. This is just from the observation that the space in "Program Files" doesn't seem to get handled correctly when looking for files down the webapps directory and FileNotFoundExceptions may result.


  1. Download the latest stable binary release of Tomcat from Http:// (zipped file)
  2. Unzip the contents of the file into
    C:\tomcat-<version number>
  3. Edit your environment variables creating the following variable and value
    CATALINA_HOME:C:\tomcat-<version number>
  4. You will need a manager user for tomcat in order to use the manager app and deploy and undeploy applications. Make sure your C:\tomcat-<version number>\conf\tomcat-users.xml file has a role and user defined for this purpose:
      <role rolename="tomcat"/>
      <role rolename="role1"/>
      <role rolename="manager"/>
      <user username="tomcat" password="tomcat" roles="tomcat"/>
      <user username="both" password="tomcat" roles="tomcat,role1"/>
      <user username="role1" password="tomcat" roles="role1"/>
      <user username="manager" password="yourpasswordhere" roles="manager"/>
  5. Tomcat can now be started from the command line or by navigating to and running
    C:\tomcat-<version number>\bin\startup.bat
  6. if you have trouble starting Tomcat (a DOS box flashes up and disappears and you don't see an obvious error) you can use
    C:\tomcat-<version number>\bin\catalina.bat run

Most of this is unneccessary if you are using the generic ant script I wrote. The enviroment variables are set for you and it doesn't use the manager app to deploy it just copies war to the webapps directory. - Andy

Need to versus want to... This is still really bloody useful. - Kelv

Update: I'm so glad this is on the wiki, coz I really needed it when setting up my new PC - Kelv

Configuring the Tomcat context

  • No labels