commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "polaris" <smart...@hotmail.com>
Subject [HTTPClient]naive problem
Date Sun, 27 Feb 2005 05:44:32 GMT
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
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message