Reputation: 37778
Is it allowed to use nested context paths like:
I have never used that layout before myself, but I need to help someone deploy an existing system, where this layout is used. It has actually worked so far, but suddenly, it doesn't anymore:
If we deploy webapp X under "/x" instead of "/", then both webapps work perfectly!
The first thing I wonder is: Is the above mentioned layout even allowed at all, or is this really a very shaky setup that depends on some amount of luck? (Where would tomcat look, if I call www.example.com/y/someServlet
? I fear, that it might look in webappX's web.xml?)
Upvotes: 1
Views: 975
Reputation: 37778
The problem was caused by the fact, that webapp X was deployed twice: Once by the specified <context>
element (which set the context path to "/"), and a second time by autoDeploy.
Moving webapp X out of the autodeploy (appBase) folder, into a different folder solved the problem. See also http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Naming
Upvotes: 1