You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by vicky <vi...@yahoo.co.in> on 2013/02/10 11:51:41 UTC

[tomcat 6.0.35]- propert loadin

 
Hi All,
 
 
My application need a "resource/properties" file to exist in the CLASSPATH, for this i placed my resource file in <CATALINA_BASE>/bin folder & it was working fine.
 
But since yesterday my application reporting the error that properties file doesnt exist in classpath/path
 
In order to fix then i created the lib folder in my <CATALINA_BASE> & placed my "properties/resourc"e file over there, which eventually fixed my application CLASSPATH issue.
 
But the thing which makes me wonder that how my application was able to access the properties file earlier when i placed it <CATALINA_BASE>/bin  location
& what makes it to stop now.
 
Kindly suggest what all can be the scenarios/prossible use case for this, 
 
TOmcat version - 6.0.35 
 
Thanks

RE: [tomcat 6.0.35]- propert loadin

Posted by David Sills <DS...@datasourceinc.com>.
Vicky:

Unless there's some reason you need to have this properties files available to all applications running in Tomcat (unusual, but not unheard of), you should probably be putting the properties file in your application, in WEB-INF/classes, which is always on the application classpath (per the JEE spec). Another way to handle it is to JAR it up into a JAR file and put it into WEB-INF/lib, but that's a bit trickier. Just a thought: that way other applications can use different values for the same properties. But if it's working for you....

David Sills


-----Original Message-----
From: vicky [mailto:vicky007aggarwal@yahoo.co.in] 
Sent: Sunday, February 10, 2013 5:52 AM
To: users@tomcat.apache.org
Subject: [tomcat 6.0.35]- propert loadin

 
Hi All,
 
 
My application need a "resource/properties" file to exist in the CLASSPATH, for this i placed my resource file in <CATALINA_BASE>/bin folder & it was working fine.
 
But since yesterday my application reporting the error that properties file doesnt exist in classpath/path
 
In order to fix then i created the lib folder in my <CATALINA_BASE> & placed my "properties/resourc"e file over there, which eventually fixed my application CLASSPATH issue.
 
But the thing which makes me wonder that how my application was able to access the properties file earlier when i placed it <CATALINA_BASE>/bin  location & what makes it to stop now.
 
Kindly suggest what all can be the scenarios/prossible use case for this, 
 
TOmcat version - 6.0.35 
 
Thanks

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: [tomcat 6.0.35]- propert loadin

Posted by vi...@yahoo.co.in.
Thanks Andre & Tim for your comments,so for this peculiar behavior  that means there is no reason that y it worked when placing the properties file in <CATALINA_BASE>/bin

Thanks,


On Feb 11, 2013, at 2:57 AM, André Warnier <aw...@ice-sa.com> wrote:

> Tim Watts wrote:
>> On Sun, 2013-02-10 at 18:51 +0800, vicky wrote:
>>> Hi All,
>>>  My application need a "resource/properties" file to exist in the
>>> CLASSPATH, for this i placed my resource file in <CATALINA_BASE>/bin
>>> folder & it was working fine.
>>> But since yesterday my application reporting the error that properties
>>> file doesnt exist in classpath/path
>>> In order to fix then i created the lib folder in my <CATALINA_BASE> &
>>> placed my "properties/resourc"e file over there, which eventually
>>> fixed my application CLASSPATH issue.
>>> But the thing which makes me wonder that how my application was able
>>> to access the properties file earlier when i placed it
>>> <CATALINA_BASE>/bin  location
>>> & what makes it to stop now.
>>> Kindly suggest what all can be the scenarios/prossible use case for
>>> this,  TOmcat version - 6.0.35  Thanks
>> The only reasonable explanation is that you angered the Supreme Tomcat
>> God by putting your resource in {CATALINA_BASE}/bin.  Being indisposed
>> to suffer fools for long, she removed it and made you do penance by
>> putting it in a Sanctioned location such as {CATALINA_BASE}/lib.  Be
>> Glad O Sister!  The Tomcat God is Merciful and Smiles down upon you!
> But let this be a warning, as She does not always act so benignly when one Jerry-rigs one's classpath.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: [tomcat 6.0.35]- propert loadin

Posted by André Warnier <aw...@ice-sa.com>.
Tim Watts wrote:
> On Sun, 2013-02-10 at 18:51 +0800, vicky wrote:
>>  
>> Hi All,
>>  
>>  
>> My application need a "resource/properties" file to exist in the
>> CLASSPATH, for this i placed my resource file in <CATALINA_BASE>/bin
>> folder & it was working fine.
>>  
>> But since yesterday my application reporting the error that properties
>> file doesnt exist in classpath/path
>>  
>> In order to fix then i created the lib folder in my <CATALINA_BASE> &
>> placed my "properties/resourc"e file over there, which eventually
>> fixed my application CLASSPATH issue.
>>  
>> But the thing which makes me wonder that how my application was able
>> to access the properties file earlier when i placed it
>> <CATALINA_BASE>/bin  location
>> & what makes it to stop now.
>>  
>> Kindly suggest what all can be the scenarios/prossible use case for
>> this, 
>>  
>> TOmcat version - 6.0.35 
>>  
>> Thanks
> 
> The only reasonable explanation is that you angered the Supreme Tomcat
> God by putting your resource in {CATALINA_BASE}/bin.  Being indisposed
> to suffer fools for long, she removed it and made you do penance by
> putting it in a Sanctioned location such as {CATALINA_BASE}/lib.  Be
> Glad O Sister!  The Tomcat God is Merciful and Smiles down upon you!
> 
But let this be a warning, as She does not always act so benignly when one Jerry-rigs 
one's classpath.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: [tomcat 6.0.35]- propert loadin

Posted by Tim Watts <ti...@cliftonfarm.org>.
On Sun, 2013-02-10 at 18:51 +0800, vicky wrote:
>  
> Hi All,
>  
>  
> My application need a "resource/properties" file to exist in the
> CLASSPATH, for this i placed my resource file in <CATALINA_BASE>/bin
> folder & it was working fine.
>  
> But since yesterday my application reporting the error that properties
> file doesnt exist in classpath/path
>  
> In order to fix then i created the lib folder in my <CATALINA_BASE> &
> placed my "properties/resourc"e file over there, which eventually
> fixed my application CLASSPATH issue.
>  
> But the thing which makes me wonder that how my application was able
> to access the properties file earlier when i placed it
> <CATALINA_BASE>/bin  location
> & what makes it to stop now.
>  
> Kindly suggest what all can be the scenarios/prossible use case for
> this, 
>  
> TOmcat version - 6.0.35 
>  
> Thanks

The only reasonable explanation is that you angered the Supreme Tomcat
God by putting your resource in {CATALINA_BASE}/bin.  Being indisposed
to suffer fools for long, she removed it and made you do penance by
putting it in a Sanctioned location such as {CATALINA_BASE}/lib.  Be
Glad O Sister!  The Tomcat God is Merciful and Smiles down upon you!



Re: [tomcat 6.0.35]- propert loadin

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Vicky,

On 2/10/13 5:51 AM, vicky wrote:
> My application need a "resource/properties" file to exist in the 
> CLASSPATH, for this i placed my resource file in
> <CATALINA_BASE>/bin folder & it was working fine.

If it's for an application, then you should put it into the
application's WEB-INF/classes directory where it belongs.

> But since yesterday my application reporting the error that 
> properties file doesnt exist in classpath/path
> 
> In order to fix then i created the lib folder in my <CATALINA_BASE>
> & placed my "properties/resourc"e file over there, which
> eventually fixed my application CLASSPATH issue.

Your CATALINA_BASE doesn't need a lib/ directory. Put it in
WEB-INF/classes in your webapp.

> But the thing which makes me wonder that how my application was
> able to access the properties file earlier when i placed it 
> <CATALINA_BASE>/bin  location & what makes it to stop now.

Your guess is as good as mine.

> Kindly suggest what all can be the scenarios/prossible use case
> for this,

Stop throwing things into Tomcat's installation directory when you
don't need to.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEAREIAAYFAlEY+MMACgkQ9CaO5/Lv0PARnACfT78E6pqje6dQs0eohBUZXAK7
qwEAnicyLwOCdie6uB7WTsDn2jwAy59J
=ld9e
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org