Java Apache未将完整参数传递给JBoss 6/Spring Web MVC
我正处于将JBoss5安装更新为JBoss6.1.0.Alpha的痛苦过程的末尾。JBoss5安装中不存在此问题 版本:Java Apache未将完整参数传递给JBoss 6/Spring Web MVC,java,spring,spring-mvc,jboss,Java,Spring,Spring Mvc,Jboss,我正处于将JBoss5安装更新为JBoss6.1.0.Alpha的痛苦过程的末尾。JBoss5安装中不存在此问题 版本: 弹簧3.2.3.释放 JBoss EAP 6.1.0.Alpha1(AS7.2.0.Alpha1-redhat-4) 带有mod_代理的Apache2.2 控制器层次结构仍然使用旧的org.springframework.web.servlet.mvc.SimpleFormController作为基本控制器 当发布一大组表单数据(不是很大;表中有326行)时,出现在控制器
- 弹簧3.2.3.释放
- JBoss EAP 6.1.0.Alpha1(AS7.2.0.Alpha1-redhat-4)
- 带有mod_代理的Apache2.2
org.springframework.web.servlet.mvc.SimpleFormController
作为基本控制器
当发布一大组表单数据(不是很大;表中有326行)时,出现在控制器中的域对象(通过MVC编组重新水合)已被截断—并非所有的域对象都会出现。如调试器中所示,以及生成的部分更新屏幕
所有的数据都可以在Chrome中看到,在帖子内部的表单数据中上升,如内容类型:application/x-www-form-urlencoded
然而,在服务器上,SpringWebMVC从发布的数据创建的对象大约在246处停止。这就好像达到了某个上限,而数据只是在该点被截断了
注意:这似乎不是“”的意思。我已添加此配置,但无效:
<bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping">
<property name="useDefaultSuffixPattern" value="false" />
</bean>
它输出请求
对象获得的所有参数
果不其然,“selected”属性(表单中的每一行都必须被选中,才能在此屏幕上产生任何影响)在245处停止(我在这里对输出进行了排序):
所以这看起来像是Apache和JBoss之间的配置问题,因为据我所知,Spring还没有机会与这个请求
实例交互(从上面显示的调用堆栈来看,它肯定不像)
下面是Apachehttp.conf
<IfModule mod_proxy.c>
ProxyRequests Off
<Proxy *>
AddDefaultCharset off
Order deny,allow
Allow from all
</Proxy>
ProxyVia On
ProxyPass /a-mgt http://localhost:8080/a-mgt
ProxyPassReverse /a-mgt http://localhost:8080/a-mgt
</IfModule>
事实证明,JBoss HTTP连接器使用的HTTP参数数量是有限制的,令人沮丧的是,无法通过我在问题中提到的XML片段进行配置 相反,必须将其作为系统属性添加到
standalong full.xml
:
...
</extensions>
<system-properties>
<property name="org.apache.tomcat.util.http.Parameters.MAX_COUNT" value="5000"/>
</system-properties>
<management>
...
。。。
...
为什么不能从HTTP连接器配置,或者至少在那里有文档记录
我在上找到了解决方案。域对象是否从数据库中重新水化?如果是这样,您是否检查过配置或DAO代码中是否有
maxResults
或fetchSize
设置可能会截断数据?当从JBoss 5迁移到JBoss 6时,可能会发生设置更改?抱歉@Willkeling,但您的想法是错误的——对象是由Spring MVC在用户从发布表单返回时创建的。这个问题中没有DB交互。谢谢你的建议!
<IfModule mod_proxy.c>
ProxyRequests Off
<Proxy *>
AddDefaultCharset off
Order deny,allow
Allow from all
</Proxy>
ProxyVia On
ProxyPass /a-mgt http://localhost:8080/a-mgt
ProxyPassReverse /a-mgt http://localhost:8080/a-mgt
</IfModule>
<subsystem xmlns="urn:jboss:domain:web:1.4" default-virtual-server="default-host" native="false">
<configuration>
<jsp-configuration development="true" check-interval="1"
modification-test-interval="1" recompile-on-fail="true"/>
</configuration>
<connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"
max-post-size="1048576000" max-save-post-size="0" max-connections="1000"/>
<virtual-server name="default-host" enable-welcome-root="true">
<alias name="localhost"/>
</virtual-server>
</subsystem>
<subsystem xmlns="urn:jboss:domain:threads:1.1">
<bounded-queue-thread-pool name="http-executor">
<core-threads count="100"/>
<queue-length count="10"/>
<max-threads count="1000"/>
<keepalive-time time="20" unit="seconds"/>
</bounded-queue-thread-pool>
</subsystem>
<socket-binding-group name="standard-sockets"
default-interface="public"
port-offset="${jboss.socket.binding.port-offset:0}">
<socket-binding name="http" port="8080"/>
</socket-binding-group>
...
</extensions>
<system-properties>
<property name="org.apache.tomcat.util.http.Parameters.MAX_COUNT" value="5000"/>
</system-properties>
<management>
...