Creating a WAR file using Maven

In a previous example, we created the WAR file using the Export option of Eclipse. In a Maven project you can create a WAR by invoking the Maven Install plugin. Right-click on the project and select the Run As | Maven install option. The WAR file is created in the target folder. You can then deploy the WAR file in Tomcat by copying it to the webapps folder of Tomcat.

Get Java EE 8 Development with Eclipse now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.