Tomcat - noi-techpark/documentation GitHub Wiki

Installation and initial configuration

On Linux Mint 18.3

Install

Install the packages with apt install tomcat8*, and start the service as service tomcat8 start. Now you can check if it is running on localhost:8080

apt install tomcat8*
service tomcat8 start
firefox localhost:8080

Logs

Logs can be found under /var/log/tomcat8/catalina.out.

User defined variables

Put them into /usr/share/tomcat8/bin/setenv.sh like export key=value, and restart the service.

Manager webapp/CLI

Enable the manager webapp or CLI: Read tomcat8 docs.

Deployment

From the manager web-application

Go to the manager, i.e., http://localhost:8080/manager/html.

With curl

curl -T path-to-your-war/abc.war -u user:pass "http://localhost:8080/manager/text/deploy?path=/abc&update=true"

With Maven

See how to deploy a maven-based war-file to tomcat.