So navigate to the WEB-INF folder of our newly created project and create a web.xml file with the following content: Since our web application does not contain any servlets, our web.xml file will be very basic. This means that if our deployment succeeds, we will access the web application by hitting Unlike the Tomcat7 Maven plugin, the Cargo Maven plugin requires that this file is present. Finally, the path element defines the context path of our deployment. The server element is the name of the server instance that Maven recognizes. The configuration url is the url to which we are sending our deployment, Tomcat will know what to do with it. Note that we are using the Tomcat 7 plugin because it works for both versions 7 and 8 without any special changes. So head over to the pom.xml and add this plugin: This will create a complete web application in the directory tomcat-war-deployment which, if we deploy now and access via the browser, prints hello world!.īut before we do that we need to make one change to enable Maven deployment.
#WAR OF RIGHTS CONSOLE COMMANDS CODE#
Type devmap map code and press Enter to enable cheats.
During gameplay, press the tilde () key to display the console window. DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false How do you use console commands in Call of Duty World at War Go to the Options menu and enable the console window. Run this command on the console to create a new Java web application: mvn archetype:generate -DgroupId=com.baeldung -DartifactId=tomcat-war-deployment Let's navigate to where we would like to create the application. We will now need to create a basic web application from Maven to test the deployment. Once you have found it add Tomcat as follows: