0

org.primefaces.webapp.filter.FileUploadFilter does not registered to my application, unless I define FileUploadFilter explicitly in my spring configuration like;

   @Bean
   FileUploadFilter fileUploadFilter() {
      return new FileUploadFilter();
   }

Referring to this question;

If you're however not using JSF 2.2 yet and you can't upgrade it (should be effortless when already on a Servlet 3.0 compatible container), then you need to manually register the below PrimeFaces file upload filter in web.xml (it will parse the multi part request and fill the regular request parameter map so that FacesServlet can continue working as usual)

Conversely I have javax.faces in my classpath: org.glassfish:javax.faces:jar:2.2.13:compile. (and mojarra impl)

Should we go manually with this? Or else It can not be detected and registered automatically, we have to register a manual configuration to joinfaces

UPDATE: Actually this is not directly relevant to registration of FileUploadFilter. Embedded jetty in spring-boot does not pick up annotated configurations example of which FacesServlet has a @MultipartConfig annotation. I have opened an issue to spring-boot for that:

https://github.com/spring-projects/spring-boot/issues/6681

Community
  • 1
  • 1
px5x2
  • 1,495
  • 2
  • 14
  • 29
  • The case is that; I want to choose `commons` as my uploader and expect `FileUploaderFilter` to picked up and registered to servlet context. Is there a condition which I miss and additionally do to get it registered? – px5x2 Aug 16 '16 at 05:26
  • @BalusC The issue has actually related with spring boot with embedded jetty. Jetty embedded in spring does not configured to pick up `@MultipartConfig` classes – px5x2 Aug 17 '16 at 17:52
  • @BalusC updated question – px5x2 Aug 18 '16 at 10:31

1 Answers1

1

https://github.com/spring-projects/spring-boot/issues/6680 will fix the issue. WebServletHandler will pick up @MultipartConfig annotated classes.

px5x2
  • 1,495
  • 2
  • 14
  • 29