RE: getRealPath is a bad idea?

2017-03-10 Thread Caldarale, Charles R
> 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

Re: getRealPath is a bad idea?

2017-03-10 Thread Christopher Schultz
-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 >>

RE: getRealPath is a bad idea?

2017-03-10 Thread Berneburg, Cris J. - US
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

Re: getRealPath is a bad idea?

2017-03-10 Thread Christopher Schultz
-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

RE: getRealPath is a bad idea?

2017-03-10 Thread Berneburg, Cris J. - US
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

Re: getRealPath is a bad idea?

2017-03-09 Thread Christopher Schultz
-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! > >>

RE: getRealPath is a bad idea?

2017-03-09 Thread Caldarale, Charles R
> 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

RE: getRealPath is a bad idea?

2017-03-09 Thread Berneburg, Cris J. - US
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 >

Re: getRealPath is a bad idea?

2017-03-07 Thread Christopher Schultz
-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? >>> [

RE: getRealPath is a bad idea?

2017-03-07 Thread Berneburg, Cris J. - US
[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 packed WA

Re: getRealPath is a bad idea?

2017-03-02 Thread Mark Thomas
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 > M

getRealPath is a bad idea?

2017-03-02 Thread Berneburg, Cris J. - US
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> not working yet. chris S>>> getRealPath is a bad idea. <<< For my education's sake, would you please