Tomcat embedded and maxPartCount setup

28 views
Skip to first unread message

André Santos

unread,
Oct 13, 2025, 5:04:14 PMOct 13
to Codehaus Cargo
Hi,
In one of our current projects, we are utilizing Tomcat 10.x, and we've encountered a limitation with the default maxPartCount value, which is currently hardcoded to 50 in the org.apache.catalina.connector.Connector.

This default is quite restrictive for our use case, and unfortunately, it is not currently configurable via plugin configuration.

We would like to request that a configurable property be introduced in a future release, allowing users to adjust the maxPartCount.

This would greatly enhance flexibility and allow applications with larger multipart form data to function without custom workarounds.

This is a simple solution for the issue : https://github.com/andre-santos-infoniqa/cargo/pull/1


Best regards.

S. Ali Tokmen

unread,
Oct 13, 2025, 5:08:55 PMOct 13
to codehau...@googlegroups.com

Hi André

That is a rather neat patch, if you also would add the new property in the configuration capability then it is even super 😉

Would you want yo create a PR into the master for it? We could then easily get it in.

Regards

S. Ali Tokmen
https://ali.tokmen.com/
https://contact.ali.tokmen.com/
--
Codehaus Cargo - https://codehaus-cargo.github.io/
---
You received this message because you are subscribed to the Google Groups "Codehaus Cargo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codehaus-carg...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/codehaus-cargo/86129dd0-8152-42eb-8d0e-cba4ce773300n%40googlegroups.com.

André Santos

unread,
Oct 14, 2025, 5:43:05 AMOct 14
to Codehaus Cargo
Hi,
I already updated the code in order to receive the prop setting system properties.

this is the PR changed: https://github.com/andre-santos-infoniqa/cargo/pull/1

I don't have write access to your repo, that's why I forked, but, please, you can use my changes.


Best regards.

S. Ali Tokmen

unread,
Oct 14, 2025, 3:26:24 PMOct 14
to codehau...@googlegroups.com

André Santos

unread,
Oct 15, 2025, 1:34:45 AMOct 15
to Codehaus Cargo
Hi,

Cool, thanks for the improvements too.

I use the plugin a lot, you did a great job, thank you very much.
I'll be waiting for the next version to be released.

Best regards,
André


S. Ali Tokmen

unread,
Oct 16, 2025, 12:42:43 AMOct 16
to codehau...@googlegroups.com

Hi André

Thanks for the nice words, and for your great contribution 🙂

The new version 1.10.24 is out, enjoy!

Johan Larsson

unread,
Oct 20, 2025, 12:32:13 PMOct 20
to Codehaus Cargo
Nice thread! For reference, we use standalone Tomcat and patching the server.xml works in the same way:

<xmlReplacements>

  <xmlReplacement>

    <file>conf/server.xml</file>

    <xpathExpression>//Server/Service/Connector[@port='${cargo.servlet.port}']</xpathExpression>

    <attributeName>maxPartCount</attributeName>

    <value>2000</value>

  </xmlReplacement>

</xmlReplacements>


S. Ali Tokmen

unread,
Oct 20, 2025, 3:00:03 PMOct 20
to codehau...@googlegroups.com

Hi Johan

Interesting that you picked that, and nice hint!

I recently checked in https://github.com/codehaus-cargo/cargo/commit/225f2636f1c653f365d5429871b49b339e9b1c16 to 1) support also on Tomcat 9.x embedded and 2) extend the support to standalone (XML-driven) configurations.

When Codehaus Cargo 1.10.25 is out, the extensions will be included.

Reply all
Reply to author
Forward
0 new messages