commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "polaris" <smart...@hotmail.com>
Subject Fw: [HTTPClient]naive problem
Date Sun, 27 Feb 2005 05:48:14 GMT

----- Original Message -----
From: "polaris" <smarto59@hotmail.com>
To: <commons-user@jakarta.apache.org>
Sent: Sunday, February 27, 2005 5:44 AM
Subject: [HTTPClient]naive problem


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

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message