Is it possible for one of the applications to support multiple context paths in Tomcat?

Is it possible for a single instance of an application to be served by multiple context paths in Tomcat?

I have an application database that has recently replaced the second application database. My problem is that many users still get access to the old context. I would like to use a common application from a single application, accessible through any of the contexts. I took a swing from the fruits of a low fruit and used a symbolic link in the "webapps" directory ... pointing the old context path to the new context path; It works, but feels "cheezy". And I don't like the fact that the database connection pool is created for both contexts (I would like to minimize the resources for connecting to the database).

In any case, if anyone knows of the “right” way to do this, I will be very grateful. I am using Tomcat 6.0.16 - there is no apache interface (I assume that rewriting the URL would be nice).

+3
source share
2 answers

, webapp ( , ), . webapp, , , , web.xml, ( Apache). , .

+2

, Tomcat Web Application Manager " WAR, ". " ():" ". " WAR URL- " , .

+1

Source: https://habr.com/ru/post/1697301/


All Articles