I have read the Tomcat 6.0 classloader documentation(below link), from this what i understood is that the "classes/jar/resource/properties file" get loaded from the following locations
1.Bootstrap classes of your JVM ($JAVA_HOME/jre/lib/ext). 2.System class loader classes ( Add bootstrap.jar & tomcat-juli.jar to CLASSPATH variable) 3.Common class loader classes ( refers $CATALINA_BASE/lib & $CATALINA_HOME/lib ) & uses $CATALINA_BASE/conf/catalina.properties 4. /WEB-INF/classes of your web application 5. /WEB-INF/lib/*.jar of your web application The thing which is still puzzling me is that how my "resource/properties files" get loaded to Tomcat CLASSPATH when i add them to "$CATALINA_BASE/bin" directory & When i move the same files to $CATALINA_BASE/conf directory then it doesn't get added to Tomcat CLASSPATH. My deployed applications need"properties/resource files ", Can someone please help me in understand the optimal way of adding these files to Tomcat CLASSPATH. Does placing the files under <CATALINA_BASE>/bin is the right approach.Please suggest In my organisation i cannot add anything to "$CATALINA_HOME/lib or bin" location ,these are read only directories http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html Thanks for your help Vicky ________________________________ From: Pid * <p...@pidster.com> To: Tomcat Users List <users@tomcat.apache.org> Sent: Saturday, 8 December 2012 10:34 PM Subject: Re: Tomcat 6.0 CLASSPATH query On 8 Dec 2012, at 03:29, "vicky007aggar...@yahoo.co.in" <vicky007aggar...@yahoo.co.in> wrote: > Application is deployed under tomcat webapps directory . It tries to refer to > application specific properties file from tomcat classpath, for that we > copied it under tomcat bin directory. > > My query is that does this is the right way to add properties file to tomcat > classpath? Did you try putting it in tomcat/lib? p > > Thanks for ur help, > Vicky > > > > On Dec 8, 2012, at 2:11 AM, Christopher Schultz > <ch...@christopherschultz.net> wrote: > >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA256 >> >> Vicky, >> >> On 12/7/12 11:48 AM, vicky wrote: >>> I have a requirement in which i need to add couple of properties >>> files to tomcat CLASSPATH as these are needed for my application >>> deployed in Tomcat 6.0. >>> >>> One strange thing is that, i need to add the all my properties >>> files to "<CATALINA_BASE>/bin" directory else these all wont get >>> added to Tomcat classpath. >> >> Where does the code live that attempts to load those properties files? >> >> - -chris >> -----BEGIN PGP SIGNATURE----- >> Version: GnuPG/MacGPG2 v2.0.17 (Darwin) >> Comment: GPGTools - http://gpgtools.org/ >> Comment: Using GnuPG with undefined - http://www.enigmail.net/ >> >> iEYEAREIAAYFAlDCVJcACgkQ9CaO5/Lv0PBTogCgoXLXbB5jx///m6qC+ZxO0f20 >> xO8An2SZPU8E0LuiPpQRCZPVw8v/T66L >> =Jmvq >> -----END PGP SIGNATURE----- >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org