0 Replies Latest reply on Feb 21, 2010 11:25 PM by null null

    Problem when upload file in portlet GateIn.

    null null Newbie

      I write the portlet that upload file to server. this is simple upload example from http://livedemo.exadel.com/richfaces-demo/richfaces/fileUpload.jsf?c=fileUpload&tab=usage . And I config the upload file will store to temp file in web.xml:

         <filter>
              <filter-name>Seam Filter</filter-name>
              <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
              <init-param>
                      <param-name>createTempFiles</param-name>
                      <param-value>true</param-value>
              </init-param>
              <init-param>
                      <param-name>maxRequestSize</param-name>
                      <param-value>2000000</param-value>
              </init-param>
      </filter>

      Then I deploy and run it on server. It upload and store to temp file when I run it as standard webapp. But it do not store to temp file when I run it as the portlet of gatein.

      I use the code to check where it store:

              if (item.isTempFile()) {
                  System.out.println("Temporary File."+item.getFile().getAbsolutePath()+item.getFileName());
              }else {
                  System.out.println("Byte Array");
              }

      I don't know how to fix this problem. Can someone tell  me what exactly I have to do?

       

      Best regards

      HieuHN