| Article: |
Sliding into WebDAV | |
| Subject: | Corrections for A Simple Example code | |
| Date: | 2004-07-12 13:29:40 | |
| From: | aaanderson | |
|
Response to: Corrections for A Simple Example code
|
||
|
All the examples in the article worked when the article was published.
|
||
Showing messages 1 through 2 of 2.
-
still uploading problem
2005-03-10 21:07:45 Sliding_into_WebDAV [Reply | View]
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





when used same corrected code with in java application the code works fine , how it is possible ?? i am using same code for both servlet and java application......