Hi,
I have requirement to upload some pdf files from the local system to the application database as blob objects.
So far i have used an applet to read the files in the local file system and have read them into a byte array. Now when i try to send the byte array after encoding it to Base64 using Apache commons codec
String fileArr = Base64.encodeBase64String(<byte array>); it always returns null, i.e, fileArr is always null.And thus only null is sent to the managed bean via the javascript function.
Could you please help me with this or if there are some other ways to send a file from an applet.
I use the JSObject.call("functionName",params) method to call my javascript function from the applet which in turn calls the managed bean method using ADFCustomEvent and a server listener.
To add some more context to this situation i had previously tried using sun.misc.Base64Encoder to wrap the byte array to a String but using this, the javascript call from the applet using JSObject seems to stop dead in its track. However if i pass a normal "Hello World!" string or any other String for that matter it works just fine.
Also if i try to pass a InputStream of the file read at the applet, the Managed Bean receives it as a HashMap(no clue why).
Please Help !!