> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
> Subject: Re: getRealPath is a bad idea?
> I would use a well-known location for the file. Maybe the application
> can be installed anywhere, but the config file needs to be in
> %APPDATA%\YourComp
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
Cris,
On 3/10/17 2:02 PM, Berneburg, Cris J. - US wrote:
> Chris
>
> Thanks for taking the time to help me out. I appreciate it.
> Sorry, my response is kinda wordy. :-P
>
>> If you really REALLY want a file path, you could use the
>> catalina.
Chris
Thanks for taking the time to help me out. I appreciate it. Sorry, my
response is kinda wordy. :-P
> If you really REALLY want a file path, you could use the catalina.base system
> property or the tmpdir and go from there. The former is Tomcat-specific, of
> course, and the tmpdir would
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
Cris,
On 3/10/17 12:56 PM, Berneburg, Cris J. - US wrote:
> Chuck
>
>>> How do you all configure the location of a special folder that
>>> is not part of the deployment package itself? A site-specific
>>> config file perhaps?
>>
>> Take a look at
Chuck
>> How do you all configure the location of a special folder that is not
>> part of the deployment package itself? A site-specific config file perhaps?
>
> Take a look at this:
> http://tomcat.apache.org/tomcat-8.5-doc/config/resources.html
>
> A element within allows specification of ar
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
Cris,
On 3/9/17 3:18 PM, Berneburg, Cris J. - US wrote:
>>> BTW, why doesn't getRealPath return the full path to the folder
>>> that the WAR file is in instead of null?
>>
>> You mean for a call like getRealPath("/")?
>
> Yes, exactly!
>
>> Well,
> From: Berneburg, Cris J. - US [mailto:cberneb...@caci.com]
> Subject: RE: getRealPath is a bad idea?
> How do you all configure the location of a special folder that is not part of
> the
> deployment package itself? A site-specific config file perhaps?
Take a loo
Chris
>> BTW, why doesn't getRealPath return the full path to the
>> folder that the WAR file is in instead of null?
>
> You mean for a call like getRealPath("/")?
Yes, exactly!
> Well, that would require a path to be returned to the "root" of
> the application. Let's say that ROOT.war is in
> /
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
Cris,
On 3/7/17 10:27 AM, Berneburg, Cris J. - US wrote:
> [SNIP]
>
>>> chris S>>> getRealPath is a bad idea. <<<
>>>
>>> For my education's sake, would you please explain that?
>>&
[SNIP]
>> chris S>>> getRealPath is a bad idea. <<<
>>
>> For my education's sake, would you please explain that? [SNIP]
>
> There is no guarantee it will return a non-null value. The typical reason
> is if the app is running from a pack
itialized?
>
> [SNIP]
>
> Martin K> In order to avoid hard coding that path,
> Martin K> I need a programmatic to find that value.
> Martin K> Unfortunately the datasource is initialized
> Martin K> before the servlet, so "getRealPath()" is
> Martin K> no
need a programmatic to find that value.
Martin K> Unfortunately the datasource is initialized
Martin K> before the servlet, so "getRealPath()" is
Martin K> not working yet.
chris S>>> getRealPath is a bad idea. <<<
For my education's sake, would you pleas
12 matches
Mail list logo