Java 7/8 request parameters size limit

余生颓废 提交于 2019-12-11 07:33:30

问题


I've upgraded recently my application. My application uses the Java web API, with servlets and jsp's. I made in the new release the switch from Java 7 to Java 8.

My server uses now the Wildfly10 platform, which uses Java 8. Previous it was Jboss 7, which uses Java 7.

In the previous version of my application, my app crashed when I was adding +- 300 attributes at a specific page, which made my request url long. But in my new version, it's not a problem anymore, without making changes at the specific code.

Is there a difference in the size limits of request url's in Java 7 and Java 8?


回答1:


It's not the Java version, its the app server that matters. App servers are trying to protect your web applications from various attacks, including so called 'hash collision DOS attack'. To beat back such attacks web servers impose limits on the number of parameters that can be passed via URL. Wildfly has the setting max-parameters (you can find the description in the official documentation). Both JBoss 7 and Wildfly 10 also have settings that limit the maximum size of a post request (maxPostSize and max-post-size respectively), maybe you stumbled across it in your previous app version.

You can find discussions of these parameters with some additional details here and here.



来源:https://stackoverflow.com/questions/38451802/java-7-8-request-parameters-size-limit

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!