I'm trying to gain access to the name of the Engine that a servlet is running in. In most cases this will be "Catalina" as configured in the /conf/server.xml file. But when another Engine is configured, say "CatalinaTesting", I need to get that name instead.
I've tried to navigate the methods and classes from: request.getSession().getServletContext() request.getSession() but I haven't been able to find the Engine name in any of the attributes or properties. Is there any way to get it? Actually, all I really need is a small string that's unique to each Engine configured on the server and stays the same after application deployments/restarts. What I'm currently using is code that grabs the last two directories in the root app path and concatenates them... something like "webappsROOT" or "webappsTestingROOT". It's unique, but ugly. Thanks, Joe