You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Saurabh Shukla <sa...@cysphere.com> on 2000/11/21 18:25:44 UTC

RE: Virtual Hosts and Properties files..

if I am getting you correctly, in your web.xml invoke a servlet at startup
and depending upon
the parameters you can pick up the path from there.  U might have to hard
code something in web.xml.

Shuklix
-----Original Message-----
From: Scott Hamilton, +61-2-9942 9693 [mailto:hamilton@grunj.cat.org.au]
Sent: Wednesday, November 22, 2000 8:44 AM
To: tomcat-user@jakarta.apache.org
Subject: Virtual Hosts and Properties files..


Greetings!

   I'm not sure exactly if this is the right forum, but here goes...
   I have JSP page using a Bean (ofcourse) this is defined in a
   virtual host (for Development, Test and Production for each
   DNS domain hosted) I'd like to read a thisbean.properties file
   (using Properties, FileInputStream and File classes)  that
   resides in the /dev/app1/web-inf/classes/ directory for that
   particular host that has a number of environment (dev,test,prod)
   properties for that bean....

   So my question (atlast), is there a property I can get to pass
   to the constructor for File to pickup the right file path of
   where the classes really is executing from????
   FWIW when I do a file.getCanonicalPath() it returns the directory
   I installed tomcat into (eg: C:\jakarta-tomcat\mybean.properties)


   Many thanx in advance for any info
      Scott, Esq.