Deploying Spring MVC Application

There are two different ways to easily deploy the Spring MVC app to our Local Tomcat server.

Approach 1:

  • Open the target folder and copy the generated war file.
  • Go to the tomcat installation folder and paste it into the “/webapp/” folder.
  • After that just start the tomcat server using bin/startup.bat or bin/startup.sh based on your system.
  • On starting the server, it will automatically take the war file and deploy it in the webapp folder.
  • To view the output, open the browser and go to http://localhost:8080/context_path/hello,
    • where context_path is the project name.

Approach 2:

  • Start your tomcat server and login to the Tomcat manager GUI by opening http://localhost in your browser.
  • In the manager app, at the bottom Deploy area, select the file and click on the deploy button.
  • Verify whether the app is deployed by visiting the context_path of the app and the hello.jsp page.



Deployment of Spring MVC Application on a Local Tomcat Server

Spring MVC is a Web Framework under the group of projects by Spring Team using Java EE technologies. It is an open source and fairly used to create robust and dependable web applications with Java Programming Language. Spring MVC is designed across the Model-View-Controller (MVC) Architecture. To run the Spring MVC web application, we want to install it on our local Tomcat Server. In this article, we will discuss the methods to installation our Spring MVC application on our local Apache Tomcat server.

Prerequisite

  • Java
  • Maven & Eclipse IDE
  • Local Apache Tomcat

Project Structure:

Similar Reads

Creating Spring MVC Application

Create a basic Spring MVC project to deploy it in our Local Tomcat server....

Creating War for Spring MVC

...

Deploying Spring MVC Application

...