Newer
Older
labs / tiddlers / content / labs / lab04 / _Labs_04_Apache Tomcat.md

We will be using a web server called Apache Tomcat. Tomcat is a web server that is able to execute Java code to generate the dynamic parts of a web page.

Tomcat is already installed in Linux desktop. We won't be using Tomcat again, so there is no need for you to install it on your own computers.

Run the following command from a terminal:

tomcat9-instance-create /tmp/$USER/tomcat

Enter that exactly as written --- you should not swap the $USER part for your username.

This command will create a Tomcat server that you are able to deploy your own applications to without needing administrator privileges.

You can start the web server using the following command:

/tmp/$USER/tomcat/bin/startup.sh

Point a web browser at:

http://localhost:8080

You should see a 404 / Not Found error page since there is currently no web pages to display. Despite the error, we can see that the web server is running and responding to requests from the user's web browser so is ready for us to add some web pages.