It all depends on what your code is. I'm assuming you're just using new
File( relpath ), which should be relative to the user.dir system property,
which should be Tomcat bin I suppose ( this is all educated guessing i
tell you. ).
Does knowing that help you? Your relative path should then be
"../webapps/myapp/etc".
Instead of getting to a file as such, you really should be using some of
the file/resource accessors from ServletContext, so that it will be
relative to the context root so that it's portable.. Look at
ServletContext.getResource() and ServletContext.getResourceAsStream().
fern
On Tue, 20 Feb 2001, Jonathan Asbell wrote:
> my web app directory structure is as follows:
>
> webapps/myapp/..........
>
> If I have a jsp and a bean in the root directory, and my bean refers to a file
>without a full path(ie. just the file name, no absolute or relative path), where does
>it loook for the ?
> WAIT.........
> This happens in jsp/servlets AND beans. With jsp servlets the default directory
>should be the root directory of the app. The bean however seems to look for a file
>with an unqualified path in the /tomcat/bin/directory.
>
> I just want some rules of thumb to follow when I am using beans and jsp/servlets
>that read and write files. How should I refer to these external files. Where are
>their default directories in the context I mentioned above?
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]