问题描述
2019-03-03 13:53:01,193 错误 [io.undertow.request](默认任务 79)UT005023:对 *********.action 的异常处理请求:java.lang.IllegalStateException:UT000047: io.undertow.server.handlers.form.FormData.add(FormData.java:68)处的io.undertow.server.handlers.form.FormData.add(FormData.java:78)处的参数数量超过了最大值1000 ) 在 io.undertow.server.handlers.form.FormEncodedDataDefinition$FormEncodedDataParser.doParse(FormEncodedDataDefinition.java:172) 在 io.undertow.server.handlers.form.FormEncodedDataDefinition$FormEncodedDataParser.parseBlocking(FormEncodedDataDefinition1.java:2) undertow.servlet.spec.HttpServletRequestImpl.parseFormData(HttpServletRequestImpl.java:762) at io.undertow.servlet.spec.HttpServletRequestImpl.getParameterMap(HttpServletRequestImpl.java:717) at org.apache.struts2.dispatcher.Dispatcher.createContextMap(Dispatcher. java:592) 在 org.apache.struts2.dispatcher.ng.PrepareOperations.createActionContext(PrepareOperations.java:78 ) 在 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:78) 在 io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) 在 io.undertow.servlet。 handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84) at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler. java:62) 在 io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) 在 org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78) 在 io.undertow.server .handlers.PredicateHandler.ha
1楼
尝试运行以下 CLI 命令来增加最大参数值:/subsystem=undertow/server=default-server/http-listener=default/:write-attribute(name=max-parameters,value=5000)
或者
在 standalone.xml 中添加 max-parameters="5000" 并重启服务器
<subsystem xmlns="urn:jboss:domain:undertow:1.2">
<buffer-cache name="default"/>
<server name="default-server">
<http-listener name="default" socket-binding="http" max-parameters="5000"/>
<host name="default-host" alias="localhost">
<location name="/" handler="welcome-content"/>
<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>
</host>