tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <>
Subject Re[2]: query unique identifier of a webapp from init()?...
Date Wed, 12 Jun 2002 20:27:58 GMT
Hello Yoav,

Yeah, I could simply  use another init property, but I was trying to
avoid excessive use of init-param's.  I'll probably just add an
init-param, though because tempdir isn't all that appealing and I
can't think of any other way.



Wednesday, June 12, 2002, 3:18:32 PM, you wrote:

SY> Howdy,
SY> How about giving it a key yourself in your web.xml?  (As a context-param
SY> or init-param to some servlet)?  That seems simpler.

SY> Alternatively, consider using javax.servlet.context.tempdir, although
SY> I'm not sure if that's in the SRV v2.2.

SY> Yoav Shapira
SY> Millennium ChemInformatics

>>-----Original Message-----
>>From: Jacob Kjome []
>>Sent: Wednesday, June 12, 2002 3:48 PM
>>To: Tomcat Users List
>>Subject: query unique identifier of a webapp from init()?...
>>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
>>For instance,  I want to set a [unique_webapp_key].log.home system
>>so, I would do:
>>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?
>>Best regards,
>> Jacob                
>>To unsubscribe, e-mail:   <mailto:tomcat-user-
>>For additional commands, e-mail: <mailto:tomcat-user-

SY> --
SY> To unsubscribe, e-mail:   <>
SY> For additional commands, e-mail: <>

Best regards,

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message