Re: Primefaces FileUpload and Prettfaces Error

Splash Forums PrettyFaces Users Primefaces FileUpload and Prettfaces Error Re: Primefaces FileUpload and Prettfaces Error

#20320

xuzhike
Participant

Lincoln, thank you very much. it really works now.

I met the same error before. see my prevous web.xml:


<filter>

<filter-name>PrimeFaces FileUpload Filter</filter-name>

<filter-class>org.primefaces.webapp.filter.FileUploadFilter</filter-class>

<init-param>

<param-name>thresholdSize</param-name>

<param-value>51200</param-value>

</init-param>

<init-param>

<param-name>uploadDirectory</param-name>

<param-value>/tmp</param-value>

</init-param>

</filter>

<filter-mapping>

<filter-name>PrimeFaces FileUpload Filter</filter-name>

<servlet-name>Faces Servlet</servlet-name>

</filter-mapping>

<filter>

<filter-name>Pretty Filter</filter-name>

<filter-class>com.ocpsoft.pretty.PrettyFilter</filter-class>

</filter>

<filter-mapping>

<filter-name>Pretty Filter</filter-name>

<url-pattern>/*</url-pattern>

<dispatcher>FORWARD</dispatcher>

<dispatcher>REQUEST</dispatcher>

<dispatcher>ERROR</dispatcher>

</filter-mapping>


two different points:

1) in your web.xml, Pretty Filter is before PrimeFaces FileUpload Filter

mime is inverse

2) in my web.xml, <filter-mapping> in PrimeFaces FileUpload Filter is <servlet-name>Faces Servlet</servlet-name>, not <dispatcher>

would you please help to explain why it can work?

thx