There is no way to do this in an server independent way. You have
several options here. You can put the file somewhere under your
ServletContext and then use the ServletContext.getRealPath to translate the
filename into a disk-based filename. You could put a parameter into your
servlet configuration as to the directory that it needs to look in for the
file.
Randy
-----Original Message-----
From: Jim George [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 26, 2001 1:45 PM
To: [EMAIL PROTECTED]
Subject: Re: Jsp app file location?
just with FileInputStream...
Randy Layman wrote:
> How do you read the file? As mentioned in several posts before,
the
> generally accepted way of doing this is to use the Classloader
> getResourceAsStream, in which case the file needs to be in the class
> loader's classpath (web-inf/classes or in a jar file in web-inf/lib).
>
> Randy
>
> -----Original Message-----
> From: Jim George [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 26, 2001 1:24 PM
> To: Tomcat List
> Subject: Jsp app file location?
>
> If I have a jsp which reads a file "data.txt", where in the Tomcat
> directory do I put it?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]