How to deploy maven web application on tomcat server?

In our last post, We have created sample Hello world application using Apache Maven.
In this post,We are going to share how to deploy web project on tomcat server.

Step-1 Generate the war file from the project

  • Right click on pom.xml file and run as maven install.
  • Take war file from the target folder(\sampleWeb\target\sampleWeb.war) of the project.
  • Go to tomcat bin folder (apache-tomcat-8.0.33\apache-tomcat-8.0.33\bin) and click on startup.bat to startup the server
First, go to Url (http://localhost:8080/).If you are getting below page that shows tomcat is working properly


Step-2 Now we can deploy war  from tomcat webapp folder (apache-tomcat-8.0.33\apache-tomcat-8.0.33\webapps).

Step-3 Copy war file in webapp folder.

Hit the URL to run the application
(http://localhost:8080/sampleWeb/)




You may be interested in Creat web application using Maven Tool.










How to deploy maven web application on tomcat server? How to deploy maven web application on tomcat server? Reviewed by JavaInstance on 11:25:00 AM Rating: 5

No comments:

Powered by Blogger.