How to Enable JBoss to Log HTTP Requests

Often times we run into scenarios where we want to see HTTP traffic received by JBoss.

Typical scenarios are when you are debugging SSO problems. You want to see if correct HTTP headers are received by JBoss (LiveCycle User Manager, to be specific).

Tools like Charles Proxy allow you to capture HTTP traffic from the client machine, sometimes installing any new tool on a business user’s machine is not an option.

Enough of context setting.. Main point I wanted to convey was it’s easy to log HTTP traffic on JBoss by following the steps below.

1) Edit – [JBOSS-HOME]/server/deploy/jboss-web.deployer/server.xml

2) Uncomment the following 2 valves for Catalina.

<Valve className=”org.apache.catalina.valves.RequestDumperValve” />

<Valve className=”org.apache.catalina.valves.AccessLogValve”
prefix=”localhost_access_log.” suffix=”.log”
pattern=”common” directory=”${jboss.server.home.dir}/log”
resolveHosts=”false” />

3) Restart JBoss.

Please note that localhost_access_log.log file (new file that gets created) only contains request headers – metadata so to speak.  The JBoss server log (server.log) contains actual HTTP requests and responses which you typically need to investigate.

About Santosh Tatke

Santosh Tatke is a Sr. Support Architect at Adobe Systems. He specializes in ADEP (formerly LiveCycle) technology stack and works closely with customers, solution consultants and partners to troubleshoot, analyze and resolve technical challenges during POC, implementation, deployment or upgrade. He is a Certified LiveCycle ES2.5 Process Management Expert.
This entry was posted in Document Services, General Interest, ADEP and tagged , , , . Bookmark the permalink.

One Response to How to Enable JBoss to Log HTTP Requests

  1. Stewart Henderson says:

    I am trying to do this for JBoss 7+ and it not longer contains the server.xml from what I can tell but only a set of standalone.xmls….any thoughts on how to configure this for doing such a thing?