You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Giorgio Franceschetti <g....@vidya.it> on 2003/12/01 09:44:21 UTC
Re: directory reference
Thanks,
it solves my problems.
Bye,
Giorgio
Tim Funk wrote:
> The best way is to use ServletContext.getResourceAsStream() to load a
> file from your webapp. This is portable (and safest) to any servlet
> container.
>
> -Tim
>
> Giorgio Franceschetti wrote:
>
>> Hi all,
>> I'd like to create a file with some configuration details for my
>> application.
>> I tryed to reference my file like this "./data.txt" and I found it in
>> my tomcat/bin directory.
>> Well, I should have expected this, quite like any other java
>> application points to the executable directory.
>> Is there any way to point to my application directory?
>> Should I assume a fixed path like tomcat/webapps/myapp ?
>> Thanks in advance,
>> Giorgio
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
> .
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org