-1

I'm trying to get the items for a selectOneMenu updated after a file has bee uploaded. To do it, I load the select items at the file upload listener and set the id for the selectOneMenu in the update attribute for the fileUpload component, but the file upload listener is not even called.

I've reproduced the error in a small project I uploaded here http://www.filedropper.com/file-upload

I'm working with PrimeFaces 3.5 on a JBoss AS7.1.3

I can't find what I'm missing. Any ideas?

Thanks in advance

iapazmino
  • 11
  • 4

1 Answers1

0

This is the resulting web.xml, including the missing faces servlet declaration and mapping that solved my problem.

<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

    <description>File Upload</description>

    <!-- This was missing -->
    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>

    <!-- File upload -->
    <filter>
        <filter-name>PrimeFaces FileUpload Filter</filter-name>
        <filter-class>org.primefaces.webapp.filter.FileUploadFilter</filter-class>
    </filter>   
    <filter-mapping>
        <filter-name>PrimeFaces FileUpload Filter</filter-name> 
        <servlet-name>Faces Servlet</servlet-name> 
    </filter-mapping>

    <context-param>
        <param-name>javax.faces.PROJECT_STAGE</param-name>   
        <param-value>Development</param-value>
    </context-param>

    <context-param>
        <param-name>primefaces.THEME</param-name>
        <param-value>glass-x</param-value>
    </context-param>

</web-app>
iapazmino
  • 11
  • 4