1
votes

How can I configure tomcat to take all requests from some applications and use another one as fallback for root.

Example: app1.war, app2.war, app3.war

I want to use app1 for all requests to /app1/, for app2 to use /app2/ and all others requests to be sent to app3.

Update: let's say that adding an Apache before Tomcat is not an option.

2

2 Answers

1
votes

Keep the names as they are and only rename app3 to ROOT.war and there you go

app1.war, app2.war, app3.war (Rename to ROOT.war)

0
votes

Put Apache HTTP server in front of your Tomcat and use simple mod_rewrite rule.

You might also try to experiment with renaming app3.war to ROOT.war (it will be available in root / context)