Request Too Large in apache tomcat 8.5

I am having the error 'request too large' when submitting a post to the backend. When I add the attribute maxPostSize="4194304" in the connector inside the file server.xml the problem goes away. But I don't want to change the server.xml file, I want to change the file web.xml in WebContent/WEB-INF.

I tried using the following in the web.xml file:


But it does not solve the problem.

Can someone tell me how to solve this by altering the web.xml file please?

I am using java servlet.

Read more here:

Content Attribution

This content was originally published by John R. Daniel at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: