Do I have to create a new directory?
Ideally, I'd just like to drop a file. -----Original Message----- From: James Mason [mailto:[EMAIL PROTECTED] Sent: Monday, September 20, 2004 8:01 PM To: Slide Users Mailing List Subject: Re: How can I put a file on a server that doesn't already exist? Matt, You can tell putMethod where to put the file. Have a look at http://wiki.apache.org/jakarta-slide/CreateNewDirectoryAndFile -James Matt Reason wrote: > I know that sounds like a really dumb question. But the problem I'm > having is that when I do: > > WebdavResource webdavResource = new WebdavResource(inURL); > File fileToPush = new File(inFile); > webdavResource.putMethod(new FileInputStream(fileToPush)); > > That actually makes 2 requests from the server. The first checks to see > if the file is there, and the second puts it there. The problem is that > the first check tosses back a 404 which throws an HttpException and the > method is toast. > > If I ssh to the server and touch a file with the same name and path as > the one I want to transfer, then works fine. > > Any ideas? > > Thanks in advance, > > Matt > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
