> From: Nick Bauman <nick@cortexity.com>
> X-Sender: nick@localhost.localdomain
> To: tomcat-dev@jakarta.apache.org, Arieh Markel <Arieh.Markel@central.sun.com>
> Subject: Re: Question about differing behavior between Unix and NT
>
> On Fri, 15 Sep 2000, Arieh Markel wrote:
>
> > On our application, the docBase is set programmatically.
> >
> > The question is with regards to whether the pathname for the docBase
> > needs to be in the format native to the host o.s ?
>
> Computing a path in Java should always use a platform-independent
> technique like:
>
> String sep = System.getProperty("path.seperator");
Nick,
Thanks for the reply.
Just a nit.
Should be 'path.separator'.
Incidentally, I prefer using 'File.separator', which gets its value assigned
from the getProperty call.
>
> instead of hardcoding the seperator to whatever seperator your host
> platform uses, eh?
That is not the problem that I am running. I don't need to query what
the separator is. What I am asking is whether the pathname that I build
for assigning to docBase should be host/OS sensitive.
(On debugging what the contexts configure, I end up with a path like:
C:/Program Files/<product>/etc/opt/ ...
the question is whether I should in such a case, convert it to
C:\Program Files\<product>\etc\opt\ ...
)
I know that within the rest of the application classes, we can normalize
the behavior of the paths to (forward) slashes on both Unix and NT platforms,
we began seen odd behavior when testing our application-embedded Tomcat on NT.
Arieh
--
Arieh Markel Sun Microsystems Inc.
Network Storage 500 Eldorado Blvd. MS UBRM11-194
e-mail: arieh.markel@sun.COM Broomfield, CO 80021
Let's go Panthers !!!! Phone: (303) 272-8547 x78547
(e-mail me with subject SEND PUBLIC KEY to get public key)
|