Deploying a web application to Apache Tomcat is very straightforward using a WAR (Web ARchive) file. By deploying we mean that we are placing a zipped web application in a location on the file system where Tomcat can make the web page(s) available to the world.
To learn how to deploy a WAR file to Apache Tomcat in a Linux environment, follow these 6 steps:
/DemoWebsitefolder and one JSP file that is stored in
/DemoWebsite. If you completed that topic in the past, then stop the Tomcat server and delete
/DemoWebsite. You will execute the
jarutility provided in the Java JDK in order to create the WAR file. The command is
sudo jar -cvf DemoWebsite.war DateJSP.jsp:
http://localhost:8080/DemoWebsite/DateJSP.jspand submit that address to the browser.