Results 1 to 1 of 1
Thread: Java Applets and File Upload
- 07-14-2009, 10:03 PM #1Member
- Join Date
- Jul 2009
- Rep Power
Java Applets and File Upload
I need to upload all the files present inside a folder on hard disk.
I have done all the research about the security issues,
1 - I have signed the applet
2 - I am using
AccessController.doPrivileged( new PrivilegedAction()
public Void run( )
to read the file.
Now the real issue: i need to send the file via HTTP post.
I am using the apache HTTP Client library.
Now the issue is:
I have created the MultipartPostMethod inside AccessController.doPrivileged.... and when I try to attach the file via: mPost.addParameter("F" + i, f1);
I get security exception. Reason I believe is that the privileged action is only applicable for the lines of code being executed inside the RUN method, if we call some outside JAR file, it is not available.
Anyone who can:
Help to solve this issue with apache library
OR - recommend some other tested and proven way.
I have searched the forum, but haven't found any solution :( ... though there are poeple who have written classes, but none are posted on forum.
Thanks for reading the whole story....
URGENT solution will be appreciated as I am stuck :(
- By kalanidhi in forum New To JavaReplies: 1Last Post: 11-10-2008, 10:49 AM
- By kuppi in forum Java AppletsReplies: 1Last Post: 10-16-2008, 10:56 PM
- By radhika123 in forum New To JavaReplies: 6Last Post: 07-11-2008, 08:04 AM
- By muralikrishna in forum New To JavaReplies: 6Last Post: 06-25-2008, 09:24 AM
- By jfileupload in forum Java SoftwareReplies: 0Last Post: 03-09-2008, 03:04 PM