I'm trying to configure an upload element with JSF, running on Weblogic 12.1.1.
I tried this both with JSF 2.1 (custom component, custom filter) and the new h:inputFile tag in JSF 2.2
And with both implementations I'm getting the same error from Weblogic: weblogic.servlet.utils.fileupload.SizeException: The field myElementId exceeds its maximum permitted size of 0 characters
I already found where the problem is coming from: Weblogic seems to ignore the max-file-size setting(part of the multipart-config tag) in the web.xml
Without the <multipart-config> part, nothing happened when clicking the upload button. So Weblogic is using the multipart-config tag, but not the max-file-size tag.
On Glashfish it all works fine. So the configuration seems to be OK. And the problem seems to be Weblogic related.
Finally, to doublecheck, we modified the FacesServlet class (JSF 2.2, org.apache.myfaces 2.2.0-SNAPSHOT version) itself with the @MultipartConfig annotation
@MultipartConfig(maxFileSize = 10485760L)
public final class FacesServlet implements Servlet
And this worked!
so finally my question :-)
How can I set the maxFileSize on Weblogic in a 'normal' way? Am I missing something? Is there maybe a weblogic.xml setting for this?
problem seems to be solved by using the com,sun.faces 2.2.2 version