tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject query unique identifier of a webapp from init()?...
Date Wed, 12 Jun 2002 19:47:38 GMT

I'm looking for a way to set unique system properties for any
individual webapp.  Maybe an example of what I need will help to
explain:

For instance,  I want to set a [unique_webapp_key].log.home system
property.

so, I would do:
System.setProperty("[unique_webapp_key].log.home")

I don't want to just set "log.home" because I'm thinking that
some other process  might override such a common name and log.home
would end up pointing to a path that I didn't expect.

I was going to use getServletContext().getServletContextName() and
replace any spaces with ".".  However getServletContextName() was introduced in Servlet
2.3 and I want it to work with Servlet 2.2.  Besides, if the
<display-name> element in the web.xml is not specified, all I get back
is null.

I also need to be able to predict the result of the unique_webapp_key
so that I can reference it from config files.

Is there something in the servlet spec 2.2+ that can help me...or am I
overlooking something more simple?

Jake

  

-- 
Best regards,
 Jacob                          mailto:hoju@visi.com


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message