3 Replies Latest reply: May 14, 2012 3:36 PM by ionutvaidianu RSS

Upload documents with lager files in richfaces 4

Pavna Daryani Newbie

I see that if I need to upload lager files using richfaces 4 I need to define createtempFiles in web.xml.

I read I need to add a filter to web.xml. But then I read that org.ajax4jsf.Filter is no longer needed in richfaces 4. My question is then who do i pass createTempFiles parameter to?

 

 

<filter>

<display-name>RichFaces Filter</display-name>

<filter-name>richfaces</filter-name>

<filter-class>org.ajax4jsf.Filter</filter-class>

<init-param>

<param-name>createTempFiles</param-name>

<param-value>false</param-value>

</init-param>

<init-param>

<param-name>maxRequestSize</param-name>

<param-value>10000000</param-value>

</init-param>

</filter>

 

 

Your help is appreciated.

thanks

pavna

 

  • 1. Re: Upload documents with lager files in richfaces 4
    arturo eduardo cabrera cordoba Newbie

    Hi, I am using Rich4 and my web.xml have this configuration:

     

     

    <context-param>

            <param-name>org.richfaces.fileUpload.maxRequestSize</param-name>

            <param-value>10000000</param-value>

        </context-param>

        <context-param>

            <param-name>org.richfaces.fileUpload.createTempFiles</param-name>

            <param-value>true</param-value>

        </context-param>

  • 2. Re: Upload documents with lager files in richfaces 4
    ionutvaidianu Newbie

    Sorry for bringing up again a discussion so old, but what was the solution for this problem. I tried with the parameters in both way (prefixed and not prefixed) in web.xml, but in both cases the temporary files are not created. Can somebody post a complete working web.xml sample? Are these aprameters still requiered in web.xml ... can they be configured somewhere else? What was changed in 4.x.x and how should the fileUpload component be configured now?

     

    My web.xml contains what's bellow, without any filter definition:

     


    <context-param>


    <param-name>org.richfaces.fileUpload.maxRequestSize</param-name>


    <param-value>10000000</param-value>

    </context-param>

    <context-param>


    <param-name>org.richfaces.fileUpload.createTempFiles</param-name>


    <param-value>true</param-value>

    </context-param>

     

    RichFaces version is 4.2.0.

  • 3. Re: Upload documents with lager files in richfaces 4
    ionutvaidianu Newbie

    After the latest discoveries I have done the two parameters are useless and not needed with RichFaces 4.2.0. The files are laways saved in the temporary folder under JBoss server and it is the responsability of the upload bean to make a copy of the files from the temporary folder before they are deleted automatically. The copy / move should be done before the end of method "public void listener(FileUploadEvent event) throws Exception" in the upload bean.

     

    I hope this helps somebody ... for me it was a royal PITA to figure this out because the entire compatibility is broken and there is no documentation to be found