Note that there are some explanatory texts on larger screens.

plurals
  1. POSpring Webflow Application + Primefaces, Fileupload does not work, HTTP Error or/and IO Error
    primarykey
    data
    text
    <p>we are developing a <strong>JSF spring webflow web application</strong> and we are trying to use the <strong>primefaces fileupload</strong> widget. primefaces works fine, the widgets get rendered correctly. however the fileupload is not working. the handlefileupload function in the backingbean FileUploadController is never called. other primefaces components for example a button can call functions in that bean, so it gets initialized correctly. below you find our configuration. currently we are developing in eclipse and deploying the web app with maven and run the app with a jetty server directly in eclipse. deploying the .war on tomcat didnt work either.</p> <p>Problem:</p> <ul> <li>after file selection and clicking on upload the widget is giving either the error 'IO Error' or 'HTTP Error'</li> <li>some data is transfered to the server (we sniffed the network traffic)</li> <li>handlefileupload() function in the backingbean FileUploadController is never called</li> </ul> <p>Dependencies</p> <ul> <li>org.primefaces 2.2.RC2</li> <li>org.springframework.webflow, webflow and faces 2.2.1.RELEASE</li> <li>commons-fileupload 1.2.2</li> <li>commons-io 2.0</li> <li>com.sun.faces, api and impl 2.0.3</li> <li>org.springframework.security</li> </ul> <p>web.xml</p> <pre><code>&lt;filter&gt; &lt;filter-name&gt;PrimeFaces FileUpload Filter&lt;/filter-name&gt; &lt;filter-class&gt;org.primefaces.webapp.filter.FileUploadFilter&lt;/filter-class&gt; &lt;/filter&gt;&lt;filter-mapping&gt; &lt;filter-name&gt;PrimeFaces FileUpload Filter&lt;/filter-name&gt; &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt; &lt;/filter-mapping&gt; </code></pre> <p>start.xhtml</p> <pre><code> &lt;h:form id="mainForm" enctype="multipart/form-data" prependid="false" &gt; &lt;p:fileUpload id="fileUp" fileUploadListener="#fileUploadController.handleFileUpload}" description="Images" /&gt;&lt;/h:form&gt; </code></pre> <p>FileUploadController.java</p> <pre><code> public void handleFileUpload(FileUploadEvent event) { System.out.println("FileUpload Test"); FacesMessage msg = new FacesMessage("ok", event.getFile().getFileName() + " is uploaded."); FacesContext.getCurrentInstance().addMessage(null, msg); } </code></pre> <p>beans-config.xml</p> <pre><code>&lt;bean id="fileUploadController" class="de.hsrm.mi.media.FileUploadController" scope="session"&gt;&lt;/bean&gt; </code></pre> <p>Thanks in advance. We hope someone can help us :)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload