Deploying WAR file to Tomcat

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" />

Reference used
http://www.mkyong.com/tomcat/how-to-install-apache-tomcat-8-on-debian/

Advertisements
This entry was posted in apache tomcat, Raspberry Pi and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s