myFaces howto - upload a file

H

hjmeu

Hi,
to upload a file in JSF using myFaces i defined the following JSF:

.....
<%@ taglib prefix="t" uri="http://myfaces.apache.org/tomahawk"%>
....
<h:form enctype="multipart/form-data">
<t:inputFileUpload
id="fileupload"
value="#{businessCaseAspectBean.upFile}"
storage="file"/>
<h:commandButton value="Submit"
action="#{businessCaseAspectBean.upload}" />
</h:form>

- I have defined the filter in web.xml

<!-- Extensions Filter -->
<filter>
<filter-name>extensionsFilter</filter-name>

<filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
<init-param>
<param-name>uploadMaxFileSize</param-name>
<param-value>100m</param-value>
</init-param>
<init-param>
<param-name>uploadThresholdSize</param-name>
<param-value>100k</param-value>
</init-param>
</filter>

The filter seems to be loaded correctly - jscookmenu working for
example ...

The Error:
----------
the form is submitted, #{businessCaseAspectBean.upload} Action called
but the #{businessCaseAspectBean.upFile} is always null / the upfile
Setter is never called...

i'm just getting crazy with that issue - any ideas?
Greets,

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top