Question: I was trying to deploy one Spring-MVC 

[![enter image description here](https://i.stack.imgur.com/vjRFv.jpg)](https://i.stack.imgur.com/vjRFv.jpg)

project on tomcat server. At first trial, it deployed successfully but on second trial it is showing me a prompt with the detail "Server Tomcat v7.0 Server at localhost failed to start."

[![enter image description here](https://i.stack.imgur.com/1kfCB.jpg)](https://i.stack.imgur.com/1kfCB.jpg)

Please help me out.

Answer: 
Yes it's possible if you configure a web server (nginx, etc) as a reverse proxy to listen on the port you want, and have it forward traffic to the correct app based on subdomain.
Yes and no. You can't run two web servers, e.g. Puma, on the same port. That won't work. But you can run one web server to serve two Rails apps. Incoming requests are routed based on either their subdomain (`app1.example.com`) or their path (`example.com/app1`).

A common setup is to use Apache/nginx as the web server in combination with Passenger as the application server. This question ask a similar question and points to Passenger's documentation on how to serve apps from subdomains: [How to deploy multiple rails app on a single IP (Apache + Passenger)?](https://stackoverflow.com/questions/3922454/how-to-deploy-multiple-rails-app-on-a-single-ip-apache-passenger)

The configuration depends heavily on your setup, so I can't give you a more detailed answer. But searching for "multiple apps" and the combination of your web and application server should yield enough results and tutorials for you to solve your problem.