Hi Mark, Thank you for your reply.
For use-cases where we might not have (easy) access to the Tomcat-server config in the run environment: Is there a way to access the Connector object, or a different solution inside the Servlet to raise this limit to circumvent possible problems when upgrading to 11.0.8/10.1.42? Best, Fabian > Am 16.06.2025 um 08:28 schrieb Mark Thomas <ma...@apache.org>: > > On 14/06/2025 07:37, Fabian Hahn wrote: >> An easy way to increase the number of form input-fields past 10 for a >> multipart request >> in Tomcat 11.0.8 would be: >> /usr/local/tomcat/conf/server.xml >> ... >> <Connector port="8080" protocol="HTTP/1.1" >> connectionTimeout="20000" >> redirectPort="8443" >> maxPartCount="100" /> <!— * add here * —> >> ... >> Mark, is there a solution in HttpServlet#doPost, #init(), or >> @MultipartConfig? > > No, because this is a Tomcat provided limit rather than one defined in the > Servlet specification. You can use the ParameterLimitValve at the Context > level if you want to be sure of overriding and Tomcat-wide settings. > > Mark > > >> Greetings, >> Fabian >> Mark Thomas wrote - Freitag, 13. Juni 2025 18:46:12 MESZ >>> https://www.google.com/url?q=https://tomcat.apache.org/tomcat-11.0-doc/config/http.html&source=gmail-imap&ust=1750660104000000&usg=AOvVaw0FZPCrRDPa1HNmnYa74YMF >>> >>> You'll need to increase maxPartCount >>> >>> Mark >>> >>> On 13/06/2025 15:13, Matthias Reischenbacher wrote: >>>> Hi, >>>> >>>> after upgrading from 11.0.6 to 11.0.8 a form multi part POST stopped >>>> working with the exception: >>>> >>>> org.apache.tomcat.util.http.InvalidParameterException: >>>> org.apache.tomcat.util.http.fileupload.impl.FileCountLimitExceededException: >>>> attachment >>>> org.apache.catalina.connector.Request.doParseParameters(Request.java:2861) >>>> org.apache.catalina.connector.Request.parseParameters(Request.java:2815) >>>> org.apache.catalina.connector.Request.getParameter(Request.java:1097) >>>> org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:152) >>>> jakarta.servlet.ServletRequestWrapper.getParameter(ServletRequestWrapper.java:160) >>>> >>>> May this be related to the following change? >>>> >>>> Update the internal fork of Apache Commons FileUpload to 1.6.0-RC1 >>>> (2025-06-05). (markt) >>>> >>>> The request body is as follows: >>>> >>>> ... >>>> Best regards, >>>> Matthias >>>> >>>> >>>> >>>> —————————————————————————————————— >>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >>>> For additional commands, e-mail: users-h...@tomcat.apache.org >>> —————————————————————————————————— >>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >>> For additional commands, e-mail: users-h...@tomcat.apache.org >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org