You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Kohn, Robert M." <ro...@ngc.com> on 2006/08/09 23:45:15 UTC

Dynamically Determining the Web App

Dear Friends,

I have two web apps that are identical except for their root directory
(and <context> entry in server.xml).
Is there any way of determining from within a servlet which one is
actually running?
Or, alternatively, is there a way of retrieving values from the
<context> section of server.xml for the corresponding web app?

Thank you very much!

- Robert Kohn

Re: Dynamically Determining the Web App

Posted by Hassan Schroeder <ha...@gmail.com>.
On 8/9/06, Kohn, Robert M. <ro...@ngc.com> wrote:
> I have two web apps that are identical except for their root directory
> (and <context> entry in server.xml).
> Is there any way of determining from within a servlet which one is
> actually running?

ServletContext.getServletContextName() should do it, eh?

-- 
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org