Women in Technology

Hear us Roar



Subject:   still uploading problem
Date:   2005-03-10 21:07:45
From:   Sliding_into_WebDAV
Response to: Corrections for A Simple Example code

I use the following code to update a file exits in tomcat v 5.5.8 server machine periodically.
the problem simply is that the file could not be uploaded though the returned boolean value is true. I suppose the files are uploaded to the defaul tomcat directory webapps/ROOT


//************************************************//
String url = "http://localhost:8080/";
HttpClient client = new HttpClient(url);
HttpURL hrl = new HttpURL(url);
hrl.setUserinfo("user","pass");
WebdavResource resource = new WebdavResource(hrl);
String filename = "FileIndexPage.xml";
File file = new File(filename);
String path = resource.getPath() + "/" + filename;
resource.putMethod( path,file );
resource.close();
//***************************************************//
=
pleas help :-0