Yes, excuse me : I wrote my code by memory, I didn't verifiy the secund
parameter !
I effectively use the same method as you.
And, like you, I verify that the file exists before calling the method (I
didn't give my entire code, that what just an example to show where my
problem was).
But the real problem is that, if the file is not ON the server itself, it
doesn't work ! The server (or the client librairy, I don't know) doesn't
understand that the path of the file is the path on the remote client...


----- Original Message -----
From: "Jean-Philippe Courson" <[EMAIL PROTECTED]>
To: "Slide Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, June 03, 2002 4:05 PM
Subject: Re: Put a file on the server


> Elodie Tasia wrote:
> > Hi,
> >
> > I'm testing the method of the WebdavResource class : putMethod(File
file).
> > The documentation about it is not clear, so I tried to put a file from
my PC
> > to a server on another computer.
> >
> > I created my file like this :
> > File myfile = new File("d:\\temp.txt");
> >
> > and then I used the put method to send it. But I got the error message :
> > FileNotFoundException.
> > That means that the server search the file on its own file system : the
data
> > on MY computer are not sent.
> >
> > Why ?
> > I don't see the utility of such a method, in that case.
> >
> > Can somenone explain ?
> >
> > Thanx
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
> >
> >
> >
>
> Hi,
>
> Which putMethod method are you using ?
>
> I use a putMethod method that takes two arguments : the path on the
> server where the file has to be put and the file itself.
>
> My code looks like :
>
> if(!file.exists()) // exception handling
> else {
>    exit = resource.putMethod(path, file);
>    if(!exit) // exception handling
> }
>
> Jp
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to