0

I am newbie to web application. I already have web application running in tomcat7. I want to run other web app on same port but probably different URLs. For eg.

http://localhost:8080/ --> goes to app1 by default http://localhost:8080/app2

How can I do that in tomcat7?

Vijay
  • 19
  • 2
  • 6

2 Answers2

1

If you rename your app1's war as ROOT.war and app2's war as app2.war, Tomcat will deploy theese exactly where you want. You can also configure it in the server.xml file.

Check out this post for details: How to set the context path of a web application in Tomcat 7.0

Community
  • 1
  • 1
okan
  • 123
  • 7
0

As other respondents have noted ROOT.war will serve up on / now if you want hi have / on one Fully qualified domain name and app2 on a different you have to configure more than one host elements in server.XML each accessing a different directory for webapps

Dave G
  • 9,639
  • 36
  • 41