Set up Tomcat web server - how it works
You can use the Tomcat web server for dynamically generated websites. We explain how to set up the server in this practical tip.
Download and install the Tomcat web server
Apache Tomcat is an open source web server that you can use to run web applications written in Java. Tomcat is developed and maintained by a free community of developers and our Apache license is published as open source software. To start up the web server, proceed as follows:
- Go to the Tomcat page. Depending on which Java version you are using, you will also need a corresponding Tomcat version. For example, the current Tomcat version 9 supports Java 8 and higher.
- Then select the "32-bit / 64-bit Windows Service Installer" under "Binary Distributions" on the download page. Open the downloaded executable.
- Follow the installation instructions. Leave the checkmark under "Choose Components". If necessary, also install the "Examples".
- Leave the entries in the "Configuration". Enter your username and password under "User Name" and "Password". Make a note of these entries.
- The path to your JRE is usually automatically selected correctly under "Java Virtual Machine". If necessary, add the correct path via "...".
- Finally, confirm the installation with "Install".
Start the Tomcat web server
You can start Tomcat immediately after the installation by leaving the check mark "Run Tomcat".
- Otherwise, go to "Programs" to "Apache Tomcat" and there to "Configure Tomcat".
- Here you can start and stop Tomcat under "General" (via "Start" and "Stop"). Here you can also have a "Startup type" and Tomcat start automatically after a restart.
- After Tomcat is running, you can see in your browser under // localhost: 8080 / that Tomcat has started successfully.
By the way, you can try out the installed examples directly on localhost: 8080 by clicking on "Examples" above and displaying "Hello World", for example. We also explain how to set up a web server with Apache.