ViewScoped bean rebuilt when FileUploadListener called using PrettyFaces

笑着哭i 提交于 2019-11-30 23:15:23
Xtreme Biker

After several brainstorming, I found it's a filter problem. Because of upload filters are in conflict with PrettyFaces filters, I had to add this to my web.xml:

<filter-mapping>
   <filter-name>PrimeFaces FileUpload Filter</filter-name>
   <servlet-name>Faces Servlet</servlet-name>
   <dispatcher>FORWARD</dispatcher>
</filter-mapping>

Many thanks @Reinaldo de Carvalho for this response

https://stackoverflow.com/a/9086137/1199132

alexSunder

In my case problem was in Tomcat server POST size limit. So, after parameter maxPostSize of Connector section in server.xml has been set file upload start to work great with @ViewScoped bean.

Also notice that tomcat official documentation is incorrect and for unlimited size of POST maxPostSize value must be set less then 0, because when it`s equals 0 means zero size.

http://tomcat.apache.org/tomcat-7.0-doc/config/ajp.html HttpRequest maximum allowable size in tomcat?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!