Re: #include'ing property files into conf/catalina.properties
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Uma, On 4/26/2009 11:46 AM, uma...@comcast.net wrote: > I am looking for a mechanism that would do the inclusion > at runtime (as in when Tomcat starts up). Hence I am unable > to use gcc. I assumed that the Java property files intrinsically > support #include making this transparent to Tomcat itself. > Perhaps I am mistaken? Neither Java nor Tomcat do this at all. You will have to make your own arrangements. One option is to use Apache ant to start your Java processes. If you are setting system properties, ant can run a Java process and specify system properties for you on the command-line, including using wildcards for selecting properties (like "myapp.*" I think). If you'd rather run startup.sh (which I think is a good idea), you can also merge those parameters into the JAVA_OPTS environment variable that the shell script will use to invoke Java, which will result in those properties being set. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkn1w4EACgkQ9CaO5/Lv0PCwgQCgo0Nj6YXhG8k7aWcix28CX+ZY KOcAoLYJSgLHT9jRYgshzbgKAxgyHjhe =6kkC -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: #include'ing property files into conf/catalina.properties
Thank you much for your response. I am looking for a mechanism that would do the inclusion at runtime (as in when Tomcat starts up). Hence I am unable to use gcc. I assumed that the Java property files intrinsically support #include making this transparent to Tomcat itself. Perhaps I am mistaken? In any event, thanks much for your helpful suggestion. Regards, /U - Original Message - From: Kees Jan Koster To: Tomcat Users List Sent: Sun, 26 Apr 2009 08:13:41 + (UTC) Subject: Re: #include'ing property files into conf/catalina.properties Dear uma_rk, > We centralize configurations in /etc/conf and hence I would > like to import property configuration files into > ${CATALINA_BASE}/conf/catalina.properties > using #include as in > >// conf/catalina.properties >... >#include /etc/conf/mytomcat.properties >... > > Please let me know if this is possible. Not out of the box. I'm sure that you can script something to this effect in your system's startup script though. Add some placeholders and used sed or even gcc's precompiler if you insist on the #include syntax. Personally I store all my configurations in SVN, relying on SVN's diff function to help me iron out any differences. Granted, that won't scale beyond 10 or so Tomcat configurations, but it does the job until you reach that stage. -- Kees Jan http://java-monitor.com/forum/ kjkos...@kjkoster.org 06-51838192 Change is good. Granted, it is good in retrospect, but change is good. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: #include'ing property files into conf/catalina.properties
in your jsp you can use struts tags to include e.g. http://struts.apache.org/2.0.14/docs/include.html bedankt, Martin __ Verzicht und Vertraulichkeitanmerkung / Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > From: kjkos...@gmail.com > To: users@tomcat.apache.org > Subject: Re: #include'ing property files into conf/catalina.properties > Date: Sun, 26 Apr 2009 10:13:41 +0200 > > Dear uma_rk, > > > We centralize configurations in /etc/conf and hence I would > > like to import property configuration files into > > ${CATALINA_BASE}/conf/catalina.properties > > using #include as in > > > >// conf/catalina.properties > >... > >#include /etc/conf/mytomcat.properties > >... > > > > Please let me know if this is possible. > > > Not out of the box. I'm sure that you can script something to this > effect in your system's startup script though. Add some placeholders > and used sed or even gcc's precompiler if you insist on the #include > syntax. > > Personally I store all my configurations in SVN, relying on SVN's diff > function to help me iron out any differences. Granted, that won't > scale beyond 10 or so Tomcat configurations, but it does the job until > you reach that stage. > -- > Kees Jan > > http://java-monitor.com/forum/ > kjkos...@kjkoster.org > 06-51838192 > > Change is good. Granted, it is good in retrospect, but change is good. > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > _ Rediscover Hotmail®: Now available on your iPhone or BlackBerry http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Mobile2_042009
Re: #include'ing property files into conf/catalina.properties
Dear uma_rk, We centralize configurations in /etc/conf and hence I would like to import property configuration files into ${CATALINA_BASE}/conf/catalina.properties using #include as in // conf/catalina.properties ... #include /etc/conf/mytomcat.properties ... Please let me know if this is possible. Not out of the box. I'm sure that you can script something to this effect in your system's startup script though. Add some placeholders and used sed or even gcc's precompiler if you insist on the #include syntax. Personally I store all my configurations in SVN, relying on SVN's diff function to help me iron out any differences. Granted, that won't scale beyond 10 or so Tomcat configurations, but it does the job until you reach that stage. -- Kees Jan http://java-monitor.com/forum/ kjkos...@kjkoster.org 06-51838192 Change is good. Granted, it is good in retrospect, but change is good. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
#include'ing property files into conf/catalina.properties
Env: Tomcat 6.0.14 JRE 1.6 We centralize configurations in /etc/conf and hence I would like to import property configuration files into ${CATALINA_BASE}/conf/catalina.properties using #include as in // conf/catalina.properties ... #include /etc/conf/mytomcat.properties ... Please let me know if this is possible. Thanks, /U