如何在JBoss 5.1.0.GA上设置最大HTTP参数计数?

问题描述 投票:4回答:3

我想为JBoss 5.1设置org.apache.tomcat.util.http.Parameters.MAX_COUNT属性。我正在按照以下方式进行操作,但是并没有受到影响。任何人都可以通过正确的语法来帮助将该属性添加到properties-service.xml文件中吗?

<attribute name="Properties">
    org.apache.tomcat.util.http.Parameters.MAX_COUNT=2
</attribute>
jboss jboss5.x
3个回答
1
投票

由于您要更改的设置是针对JBoss服务器中嵌入的Tomcat的,因此您必须在Tomcat配置中更改此设置。在JBoss-5.1.0.GA上,该文件名为:server.xml,可以在Tomcat配置目录中找到(假设您位于根jboss-5.1.0.GA目录中):/server/default/deploy/jbossweb.sar。如果您没有使用default目录来部署应用程序,则将路径中的default替换为:allminimalstandardweb或正在使用的任何内容。] >

server.xml]中,您要找到Service配置条目(默认配置中的第9行),然后在该条目中找到Connector协议连接器的HTTP配置条目(在默认配置的第12行)。您可以使用公共连接器配置属性设置要解析的请求参数的最大数量(包括GETPOST请求):maxParameterCount

从默认的HTTP连接器配置开始:

<Service name="jboss.web">
    <Connector protocol="HTTP/1.1" port="8080"
                address="${jboss.bind.address}"
                connectionTimeout="20000" redirectPort="8443" />

您将添加maxParameterCount属性以具有:

<Service name="jboss.web">
    <Connector protocol="HTTP/1.1" port="8080"
                address="${jboss.bind.address}"
                connectionTimeout="20000" redirectPort="8443"
                maxParameterCount="2" />

如果要对HTTPS/SSL/TLS连接器进行相同的配置更改,您还希望更改该协议连接器配置条目(默认配置中的第25行)。>>

从默认的HTTPS/SSL/TLS连接器配置开始:

<Connector protocol="HTTP/1.1" SSLEnabled="true" 
       port="8443" address="${jboss.bind.address}"
       scheme="https" secure="true" clientAuth="false" 
       keystoreFile="${jboss.server.home.dir}/conf/chap8.keystore"
       keystorePass="rmi+ssl" sslProtocol = "TLS" />

您将添加maxParameterCount属性以具有:

<Connector protocol="HTTP/1.1" SSLEnabled="true" 
       port="8443" address="${jboss.bind.address}"
       scheme="https" secure="true" clientAuth="false" 
       keystoreFile="${jboss.server.home.dir}/conf/chap8.keystore"
       keystorePass="rmi+ssl" sslProtocol = "TLS"
       maxParameterCount="2" />

您确定将其放入适当的mbean中吗?这对我有用,看起来和您几乎一样。

<mbean code="org.jboss.varia.property.SystemPropertiesService" 
     name="jboss:type=Service,name=SystemProperties">

    <attribute name="Properties">
                  org.apache.tomcat.util.http.Parameters.MAX_COUNT=10000
    </attribute>
</mbean>

对于JBoss 6.3,这对我有用,

在standalone.xml文件中添加以下条目

...
</extensions>

<system-properties>
    <property name="org.apache.tomcat.util.http.Parameters.MAX_COUNT" value="5000"/>
</system-properties>

<management>...

1
投票

您确定将其放入适当的mbean中吗?这对我有用,看起来和您几乎一样。

<mbean code="org.jboss.varia.property.SystemPropertiesService" 
     name="jboss:type=Service,name=SystemProperties">

    <attribute name="Properties">
                  org.apache.tomcat.util.http.Parameters.MAX_COUNT=10000
    </attribute>
</mbean>

0
投票

对于JBoss 6.3,这对我有用,

在standalone.xml文件中添加以下条目

...
</extensions>

<system-properties>
    <property name="org.apache.tomcat.util.http.Parameters.MAX_COUNT" value="5000"/>
</system-properties>

<management>...
© www.soinside.com 2019 - 2024. All rights reserved.