tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Tulley" <JTUL...@novell.com>
Subject Re: unpackWars
Date Wed, 06 Aug 2003 19:43:37 GMT
One way that I know that seems to work with Tomcat is to call
getServletContext().getRealPath()
If it returns null, that means you are running as a WAR file.  

I'm not sure how reliable this is.  Seems to be fine from what I've
seen.

Jeff Tulley  (jtulley@novell.com)
(801)861-5322
Novell, Inc., The Leading Provider of Net Business Solutions
http://www.novell.com

>>> Derrick.Koes@smith-nephew.com 8/6/03 1:38:39 PM >>>
Is there any way to query tomcat from my web app at runtime to find
out
whether it's running my web app as packed or unpacked?
 
I wish to do some things differently for development purposes if
running
unpacked.
I set unpackWARs in the Host element in the server.xml configuration
file.
 
Thanks,
Derrick
 
 
 
This electronic transmission is strictly confidential to Smith & Nephew
and
intended solely for the addressee.  It may contain information which
is
covered by legal, professional or other privilege.  If you are not the
intended addressee, or someone authorized by the intended addressee to
receive transmissions on behalf of the addressee, you must not retain,
disclose in any form, copy or take any action in reliance on this
transmission.  If you have received this transmission in error, please
notify the sender as soon as possible and destroy this message.

Mime
View raw message