1

I want to build a simple file uploading applet in Java. It will be used to upload files to a regular linux web server. So if someone went to:

http://site.com/file-upload-applet

And uploaded a file there via the applet, it will be accessible at:

http://site.com/uploads/your-file.jpg

The user should be able to click 'Browse', and then look through the folders on his computer ,and be able to select as many files, or every file in a folder, if he wanted. Then, when he hits upload, he should be shown a progress bar while the files are uploaded.

Any thoughts about this, and how this could be accomplished in Java as an applet? I will just need some pointing in the right direction, such as which Libraries to use.

2 Answers 2

3

You'd need to have a signed applet, as unsigned applets do not have access to the filesystem.

I found an article about signed Applets.

As for the other components, you'll most likely need a JFileChooser, JProgressBar, and a JButton (that uses Apache HttpClient's PostMethod with a MultipartRequestEntity that wrape the JFileChooser's file in a FilePart).

Sign up to request clarification or add additional context in comments.

1 Comment

once the applet is signed, how can i show them the browse button to let them pick the file? and how can i show a progress bar? which swing controls do i use, or is there another way?
1

I used the Apache Commons File Upload, and it worked like a charm. It took away most of the problems I was worried about, and was very easy to use.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.