`String webDavUrl = "http://" + masterServerHost + ":" + (System.getProperty("masterServerPort") != null ? System.getProperty("masterServerPort") : "8080") + "/webdav" + fileName;
try {
byte[] data = FileUtils.readFileToByteArray(new File(localFilePath));
SardineImpl sardine = new SardineImpl();
sardine.setCredentials(System.getProperty("masterServerUser"),System.getProperty("masterServerPass"));
sardine.enablePreemptiveAuthentication(new URL(webDavUrl));
try {
sardine.put(webDavUrl, data, "application/zip");
} catch (SardineException se) {
logger.warning(se.getMessage());
}
} catch (Exception e) {
logger.warning(e.getMessage());
}
}
Please someone help me.`
`String webDavUrl = "http://" + masterServerHost + ":" + (System.getProperty("masterServerPort") != null ? System.getProperty("masterServerPort") : "8080") + "/webdav" + fileName;
try {
byte[] data = FileUtils.readFileToByteArray(new File(localFilePath));
SardineImpl sardine = new SardineImpl();
sardine.setCredentials(System.getProperty("masterServerUser"),System.getProperty("masterServerPass"));
sardine.enablePreemptiveAuthentication(new URL(webDavUrl));
try {
sardine.put(webDavUrl, data, "application/zip");
} catch (SardineException se) {
logger.warning(se.getMessage());
}
} catch (Exception e) {
logger.warning(e.getMessage());
}
}
Please someone help me.`