Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 617759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:28:15+00:00 2026-05-13T18:28:15+00:00

my ajax application uploads a file to a Java application container from the user’s

  • 0

my ajax application uploads a file to a Java application container from the user’s browser. What I’d like to do is this: once the uploading has completed I want to “send” the file to a WebDAV server, identified by the host name (i.e. localhost), the port (i.e. 8080) and the location where I want to store the file (i.e. dir1/dir2).

What I am after is basically a WebDAV client framework that enables me to upload a file to WebDAV. In my application I am already using “webdavclient4j”, but I don’t seem to find a way to upload a file with it?

Any ideas? Thanks in advance for any help you might provide.

F

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T18:28:15+00:00Added an answer on May 13, 2026 at 6:28 pm

    You can do it with only a few lines of code using my recently released and super easy to use modern webdav client for java, Sardine. Here is a couple examples (first one uses commons-io to read the file):

    Sardine sardine = SardineFactory.begin("username", "password");
    byte[] data = FileUtils.readFileToByteArray(new File("/file/on/disk"));
    sardine.put("http://yourdavserver.com/adirectory/nameOfFile.jpg", data);
    

    or using streams:

    Sardine sardine = SardineFactory.begin("username", "password");
    InputStream fis = new FileInputStream(new File("/some/file/on/disk.txt"));
    sardine.put("http://yourdavserver.com/adirectory/nameOfFile.jpg", fis);
    

    https://github.com/lookfirst/sardine

    cheers,

    jon

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a JavaScript application that works like this: Uploads a file, receives the
I'd like to build an application(s) with rich ajax-based user interface. Key UI features
I want to upload a file with AJAX in a JSF application. The idea
I've been trying to Base64 encode image data from the user (in this case
I am currently using php and ajax file upload to develop a web application.
I have a php file for uploading a picture (it uploads the picture, creates
Say I have an AJAX application with this URL: http://www.foo.com/bar#!a=1&b=2&c=3 What will the crawable
I am creating a school management system that handles file uploads and downloads from
Want to upload a file using ajax for this using this uploader http://valums.com/ajax-upload/ and
I have a Java Google App Engine web application that allows user upload of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.