2 Apache Tomcat - OpenHistoricalDataMap/OHDM-Website GitHub Wiki
Tomcat
Apache Tomcat is an application server which serves Java applications to the user. Apache Tomcat is open source and implements Java Servlet, JavaServer Pages, Java Expression Language and Java WebSocket technologies.
Here is how you can setup tomcat on a Debian machine.
Update package list and install tomcat. (9 is the version number)
sudo apt-get update
sudo apt-get install tomcat9 tomcat9-admin tomcat9-docs
From now on you can access tomcat under the port :8080. Next step is configuring, starting with adding a user. For this use the Editor of your choice.
sudo nano /etc/tomcat9/tomcat-users.xml
In this XML are many comments, one of the last being a great example on how to add a user.
<tomcat-users>
<user username="superuser" password="ThisIsTotallySafe123" roles="manager-gui, admin-gui"
</tomcat-users>
Be sure to add the user between the tomcat-users tags
It may be necessary to restart the tomcat9 service
sudo service tomcat9 restart
Since you added a user you can now access
http://localhost:8080/manager/html
http://localhost:8080/host-manager/html
http://localhost:8080/docs/html (does not need a user and is openly available)
On /manager you can deploy Web application ARchives this is also where you stop and run Applications.
/host-manager is all about virtual hosts.
This is it, Tomcat is running on your system.