webtier@glassfish.java.net

Upload file component in JSF 1.2

From: <webtier_at_javadesktop.org>
Date: Wed, 17 Mar 2010 18:06:45 PDT

Hi,

I am developing an application with JSF 1.2 . I am using a custom component made with Apache Commons FileUpload 1.2.1 API which purpose is to upload files. This component work only if the form data is encoded with the “multipart/form-data” encoding instead of the usual “application x-www-form-urlencoded” encoding. From what I know JSF 1.2 doesn't handle this type of encoding. To overcome this issue, I install a servlet filter that intercepts a file upload and turns uploaded files into request attributes. The problem is that when the form data is encoded with the “multipart/form-data” encoding no characters are encoded. I have other JSF components in this form and in them I put different international characters which are lost when the form is submit because they are not encoded.
Can somebody help me with this issue ?
[Message sent by forum member 'hophman']

http://forums.java.net/jive/thread.jspa?messageID=392461