Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to deal with the form with ENCTYPE="multipart/form-data" in JSF

843844Jan 14 2008 — edited Jan 24 2008
nowadays i am ordered to make a fileUpload component which could invoke under jsf application. According to the RFC 1867 to upload file through HTTP, the form post to sever should ENCTYPE="multipart/form-data", so i write code like this:
<f:view>
    <h:form ENCTYPE="multipart/form-data" >
        <input type="file" name="choose file"/>
        <h:commandButton value="upload" actionListener="#{uploadBean.upload}">
     </h:form>
</f:view>
but it doesn't work, plz anyone show me the answer,thanks!!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 21 2008
Added on Jan 14 2008
10 comments
661 views