1 Reply Latest reply on Apr 9, 2009 5:43 AM by Arbi Sookazian

    s:fileUpload - null output in Setter

    Jubril Adisa Novice

      I am using Seam 2.1.1 running on Jboss 4.2.2 I am using a s:fileUpload


      <s:fileUpload data="#{newMemberProfile.uploadedResumeData}" id="sfu127"></s:fileUpload>


      But i realize that the uploadedResumeData is always returning Null



      This is my .xhtml file


      <h:form enctype="multipart/form-data">

      <s:fileUpload data="#{newMemberProfile.uploadedResumeData}" id="sfu127"></s:fileUpload>

      </h:form>


      and my web.xml


      <?xml version="1.0" ?>
      <web-app 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"
              version="2.5">

              <!-- RichFaces -->

              <context-param>
                      <param-name>org.richfaces.SKIN</param-name>
                      <param-value>emeraldTown</param-value>
              </context-param>

              <!-- Suppress spurious stylesheets -->

              <context-param>
                      <param-name>org.richfaces.CONTROL_SKINNING</param-name>
                      <param-value>disable</param-value>
              </context-param>

              <context-param>
                      <param-name>org.richfaces.CONTROL_SKINNING_CLASSES</param-name>
                      <param-value>disable</param-value>
              </context-param>

              <!-- Change load strategy to DEFAULT to disable sending scripts/styles as packs -->

              <context-param>
                      <param-name>org.richfaces.LoadStyleStrategy</param-name>
                      <param-value>ALL</param-value>
              </context-param>

              <context-param>
                      <param-name>org.richfaces.LoadScriptStrategy</param-name>
                      <param-value>ALL</param-value>
              </context-param>

              <!-- Seam -->

              <listener>
                      <listener-class>
                              org.jboss.seam.servlet.SeamListener
                      </listener-class>
              </listener>

              <filter>
                      <filter-name>Seam Filter</filter-name>
                      <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
              </filter>

              <filter>
                      <filter-name>MyFacesExtensionsFilter</filter-name>
                      <filter-class>
                              org.apache.myfaces.webapp.filter.ExtensionsFilter
                      </filter-class>
                      <init-param>
                              <param-name>uploadMaxFileSize</param-name>
                              <param-value>20m</param-value>
                              <description>
                                      Set the size limit for uploaded files. Format: 10 - 10
                                      bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB
                              </description>
                      </init-param>
              </filter>

              <filter-mapping>
                      <filter-name>Seam Filter</filter-name>
                      <url-pattern>/*</url-pattern>
              </filter-mapping>

              <!-- extension mapping for adding <script/>, <link/>, and other resource tags to JSF-pages  -->
              <filter-mapping>
                      <filter-name>MyFacesExtensionsFilter</filter-name>
                      <!-- servlet-name must match the name of your javax.faces.webapp.FacesServlet entry -->
                      <servlet-name>Faces Servlet</servlet-name>
              </filter-mapping>

              <!-- extension mapping for serving page-independent resources (javascript, stylesheets, images, etc.)  -->
              <filter-mapping>
                      <filter-name>MyFacesExtensionsFilter</filter-name>
                      <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
              </filter-mapping>


              <servlet>
                      <servlet-name>Seam Resource Servlet</servlet-name>
                      <servlet-class>
                              org.jboss.seam.servlet.SeamResourceServlet
                      </servlet-class>
              </servlet>

              <servlet-mapping>
                      <servlet-name>Seam Resource Servlet</servlet-name>
                      <url-pattern>/seam/resource/*</url-pattern>
              </servlet-mapping>

              <!-- Facelets development mode (disable in production) -->

              <context-param>
                      <param-name>facelets.DEVELOPMENT</param-name>
                      <param-value>true</param-value>
              </context-param>

              <!-- JSF -->

              <context-param>
                      <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
                      <param-value>.xhtml</param-value>
              </context-param>

              <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>*.seam</url-pattern>
              </servlet-mapping>

              <security-constraint>
                      <display-name>Restrict raw XHTML Documents</display-name>
                      <web-resource-collection>
                              <web-resource-name>XHTML</web-resource-name>
                              <url-pattern>*.xhtml</url-pattern>
                      </web-resource-collection>
                      <auth-constraint />
              </security-constraint>


             


      </web-app>







      Please Help