Run J2ee(JSP and Servlet) application on tomcat server

To run a JSP and Servlet, Make sure the tomcat server is configured in your machine. After that, you have to just follow the below steps in order to run the Java web project on the tomcat server.

Steps to run Java project on tomcat

  1. Right-click on the root folder of the project.
  2. Select Run AS
  3. Click to Run on Server.
  4. Select the server as tomcat.
  5. Click to Next and Finish.
  6. The application will launch over the configured browser of the application.

In case of any error check out the Tomcat Error Solving solution

Run Spring MVC application on tomcat server

Suppose, you have configured any Spring MVC project from codebun. Now below are the steps to run and use this Spring MVC application for future uses.

Steps to run Spring MVC project on tomcat

  1. Right-click on the root folder of the project.
  2. Select Run AS
  3. Click to Run on Server.
  4. Select the server as tomcat.
  5. Click to Next and Finish.
  6. The application will launch over the configured browser of the application.

In case of any error check out the Tomcat Error solving solution

Run Spring Boot application on tomcat server

If the Spring boot project configuration is done by the codebun team, Now below are the steps that you need to follow in order to run the application.

Steps to run Spring boot project

  • Goto src/main/java section in your application.
  • Click on the first package of the application.
  • Right-click on the application runner(File name that ends with Application.java) file.
  • Select Run AS
  • Click to Java Application.
  • Now Observe the console and check the port number where your tomcat server is running.
  • Now under the src/main/resources open the application.properties file.
  • And check the value of  server.servlet.context-path
  • Now open the browser and enter the URL as http://localhost:8083/Car-Rental where 8083 is the port number that you observe from the console. It will differ in your case, and /Car-Rental is the value of server.servlet.context-path that will also depend on your project.