Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

9.5. Configure a Global Valve


Global valves are enabled and configured in the web subsystem. This is done using the JBoss CLI tool.

Procedure 9.2. Configure a Global Valve

  1. Enable the Valve

    Use the add operation to add a new valve entry.
    /subsystem=web/valve=VALVENAME:add(module="MODULENAME",class-name="CLASSNAME")
    Copy to Clipboard Toggle word wrap
    You need to specify the following values:
    • VALVENAME, the name that is used to refer to this valve in application configuration.
    • MODULENAME, the module that contains the value being configured.
    • CLASSNAME, the classname of the specific valve in the module.
    For example:
    /subsystem=web/valve=clientlimiter:add(module="clientlimitermodule",class-name="org.jboss.samplevalves.RestrictedUserAgentsValve")
    Copy to Clipboard Toggle word wrap
  2. Optionally: Specify Parameters

    If the valve has configuration parameters, specify these with the add-param operation.
    /subsystem=web/valve=VALVENAME:add-param(param-name="PARAMNAME", param-value="PARAMVALUE")
    Copy to Clipboard Toggle word wrap
    You need to specify the following values:
    • VALVENAME, the name that is used to refer to this valve in application configuration.
    • PARAMNAME, the name of the parameter that is being configured for specific valve.
    • PARAMVALUE, the value of the specified parameter.
    For example:

    Example 9.1. Valve configuration

    /subsystem=web/valve=clientlimiter:add-param(
       param-name="restrictedUserAgents", 
       param-value="^.*MS Web Services Client Protocol.*$"
    )
    Copy to Clipboard Toggle word wrap
The valve is now enabled and configured for all deployed applications.
Refer to Create a Custom Valve section of the Developement Guide for more information on how to create a custom valve.
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können. Entdecken Sie unsere neuesten Updates.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Theme

© 2026 Red Hat
Nach oben