In this post, I will continue to go thru the steps required to deploy a WAR file to the raspberry pi. And yes, it will works for other linux based system.
To deploy the WAR file, simply copy the WAR file to /opt/tomcat9/webapps/ folder and restart the tomcat server. The extraction and deployment of the WAR file will start automatically.
For example if your WAR file is named as jack.war, you could simply browse to http://localhost:8080/jack on your browsers to check that it is working.
Next if you want to change the default port in which Tomcat listen to, you would have to head over to /opt/tomcat9/conf/server.xml, below is the default
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
Personally I had changed it to port 80 as can be seen below.
<Connector port="80" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />