-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Jamie,
On 10/2/15 11:23 AM, Jamie Jackson wrote: > On Thu, Oct 1, 2015 at 5:25 PM, Christopher Schultz < >> Are you trying to get this value from application code using >> standard APIs, or are you trying to locate the value from within >> something like a Valve, which is Tomcat-specific? > > *Anywhere* is fine with me. > > I'm having some trouble with file uploads in an app. I'm asking > about it in the language's (Lucee's) forums, and people seem to be > hung up on the idea that it's a Tomcat setting (specifically this > maxFileSize setting) -- they're claiming it's got a default of 50MB > that I need to increase, but I'm seeing no evidence of such a > default. (There are apps in the wild, including the manager app, > which have a 50MB limit *specified in web.xml*, but I can find no > evidence that Tomcat, itself, has such a default.) Tomcat has a couple of defaults, but only one of them is Tomcat-specific : <Connector> maxPostSize - default is 2MiB http://tomcat.apache.org/tomcat-7.0-doc/config/http.html http://tomcat.apache.org/tomcat-7.0-doc/config/ajp.html If you are using Java Servlet 3.0 multipart upload, then your file limits may be specified in web.xml like this: <servlet> ... <multipart-config> <location>/tmp</location> <max-file-size>20848820</max-file-size> <max-request-size>418018841</max-request-size> <file-size-threshold>1048576</file-size-threshold> </multipart-config> </servlet> https://docs.oracle.com/javaee/6/tutorial/doc/gmhal.html The spec-defined limits for the max-file-size and max-request-size are both "unlimited" and the default for file-size-threshold is 0 bytes (always store the file on disk). You can also define these limits using an @MultipartConfig annotation on the code. I'm not sure which "wins" if these two are in conflict, but I would hope that the web.xml-defined values would win, since that doesn't require a re-compile of the source to modify them. Lastly, you may have some application-defined limits. Of course, we know nothing about those. But Tomcat has no magical 50MiB limit on anything. (Except for file-uploads specifically for the manager application.) - -chris -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJWD+ToAAoJEBzwKT+lPKRYgzkP/3j7lNrcgFzFRyU1eC2mseOB PkmDULhJEclRT9K1BpJ6KbfpVgIp+e1eXA9CnEy+Vk6heuAQqN2bqjhKaDTD1C+X a3BVGrNetmXmoDPBxf5i5yUO+UL+OBYNiJsDtjTOquvXd0XE4cCbDZkZrVYSSGKo Uf9oir5AYgx0+5ew4nJSuVaEIgHCESyidJBpxF98gcUPQdTieuHnHzyx2jQI5pXM cqFrPQh1Jx4O3jSI4HWWZbIeujpYtPAAqZXD0i5qyzyS0POKBi8JRit+AP9LJVc6 J+uDUO75sCv6FeUFrfF0sgO5oCSJyBAIkR5IH3fdoXyN2zYv60kVpM1D1C+7hPdL +23edNE7fxWXGc+I9KXZhsOl5HaI/LXL0IBJ+JHDBh+9VU/n5X9LdKFzpBmkWQ5b zUkS6yWelMQh3mS5D9U8HoIbwPVOVud3TujdzJSGCWwOvkY223ccJ2b1S9hjsJuz e+bkzA5GDbc4TBaX04RP/Ti/s6Tt00LZARrOIsCZKTLHqc9hOHoKVsw3LzOnHFNi Quo2wIPDQSXa4NTBAlRIDHFUU7dS6XhGMuQqHrXqQJj8jdpeekINwn5itP1f5nb9 1KHNXEGfuOjg3tiATRg+n5dyGv2Q16OxR/82DkhShY6IW0MR5N+RZ4L2cGMZxOHo D6IV2MYQ4tG1kOuKVM8V =lX2z -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org