eclipse-ee4j/mojarra

form with enctype="multipart/form-data" does not support large input data (16425 bytes)

Closed this issue · 5 comments

Beginning with wildfly 30.0.0 parameter with more than 16425 Bytes input data are ignored if form has enctype "multipart/form-data"

BackingBean:
package bug;

import java.io.Serializable;

import jakarta.enterprise.context.RequestScoped;

import jakarta.inject.Named;

@nAmed

@RequestScoped

public class BackingBean implements Serializable{

private String content;

private String test = "1";

public String getContent() {

return content;

}

public void setContent(String content) {

this.content = content;

}

public String getTest() {

return test;

}

public void setTest(String test) {

this.test = test;

}

public void action() {

test +="AAAAAAAAAAAAAAAAAAAAAAA\n";

System.out.println("Size of test:"+test.length());

}

{color:#000000}}

index.xhtml

xmlns:h="jakarta.faces.html"

lang="de">

<h:head>

</h:head>

<h:body>

<h:form enctype="multipart/form-data" id="testForm">

<h:inputTextarea value="#{backingBean.test}" cols="20" rows="10"/>


<h:commandButton value="Submit" action="#{backingBean.action}" id="btn"/>

</h:form>

<script > document.getElementById("testForm\:btn").click(); </script>

</h:body>

A complete example working is inside https://issues.redhat.com/browse/WFLY-18821

Version Mojarra inside Wildfly 30 is 4.0.4

tested with mojarra 4.0.5, same problem occurs

BalusC commented

Norepro. Nothing was "recently" changed in Mojarra related to that either. Mojarra is in the context of this problem merely the user of the HttpServletRequest not the implementor/provider of it. That's the servletcontainer itself (via jakarta.servlet.* implementations).

Just try a different servletcontainer to exclude the one and other. E.g. Glassfish, Liberty, Tomcat, etc. Or even an older version of WildFly with the latest Mojarra.

Not an issue in Mojarra itself and work around was provided in original WildFly ticket https://issues.redhat.com/browse/WFLY-18821, so closing off.