November 20, 2018

How to Enable RequestDump in JBoss EAP 6 and 7

What is RequestDump?

It is a great debugging tool, that prints HTTP request and response in jboss server.log.

JBoss EAP EAP 6.1.0 or later

Edit standalone.xml.


<subsystem xmlns="urn:jboss:domain:web:2.2" default-virtual-server="default-host" native="false">
    ...
    <virtual-server name="default-host" enable-welcome-root="true">
        ...
    </virtual-server>
    <valve name="RequestDumperValve" module="org.jboss.as.web" class-name="org.apache.catalina.valves.RequestDumperValve"/>
</subsystem>

JBoss EAP EAP 7.x

Edit standalone.xml.


<subsystem xmlns="urn:jboss:domain:undertow:4.0">
    ...
    <server name="default-server">
        ...
    </server>
    ...
    <filters>
        ...
        <expression-filter name="requestDumperExpression" expression="dump-request"/>
    </filters>
</subsystem>

No comments: