On Thu, 20 Dec 2001, martin eberle wrote:

>
> Question 1:
> >From which base directory does tomcat try to access the data dir?
> (/var/tomcat4/bin/../webapps/mywebap/data/attachements/) ??...
>

>From whatever directory Tomcat itself is running.  That varies between
different versions of Tomcat (and also depends on how you start it), so
you cannot make *any* assumptions.

> Question 2:
> Is my savePath definition just wrong?
>

Yes.

You've got two choices:

* Get the pathname of the document root for your webapp, and compute
  the path you want from there (this only works if you run your app
  in an unpacked directory - it won't be portable to all containers):

    String base = getServletContext.getRealPath("/");
    if (!base.endsWith("/"))
        base += "/";
    base += "data/attachments/";

* Pass the absolute pathname of the attachments directory as a servlet
  initialization parameter.

> What i'm wondering about: with Tomcat 3.2x, the fileupload worked as
> well ....
>

Only by coincidence.

> Thx for any answers ...
>
> Regards,
> -martin
>

Craig


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to