Using @multipartconfig in a servlet running on GlassFish 3.2.2

Today I run into a problem with a custom JSF component using the @MultipartConfig. Trying to use my FileUpload Bean ( results in the following error message:

[#|2013-04-26T15:37:21.769+0200|WARNING|glassfish3.1.2||_ThreadID=20;_ThreadName=Thread-2;|StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
java.lang.IllegalStateException: PWC4016: Request.getParts is called without multipart configuration.  Either add a @MultipartConfig to the servlet, or a multipart-config element to web.xml

It seems that this error did not be thrown on a GlassFish 3.2.1 server.

Finally I was able to fix the problem when adding the following servlet configuration into the web.xml file for my Faces Servlet.

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



Leave a Reply

Your email address will not be published. Required fields are marked *