Is there a way to register HTTP message data in JBoss 7.1.1?

Is there a way to register HTTP message data in JBoss 7.1.1?

Is there a class that you set to DEBUG in the logging configuration that will output this?

+4
source share
1 answer

You can configure HTTP access protocols in the web subsystem of standlone.xml or domain.xml .

Here is an example:

 <subsystem xmlns="urn:jboss:domain:web:1.0" ....> <connector name="http" ... /> <virtual-server name="default-host" enable-welcome-root="true"> <whatever aliases you may have defined /> <access-log> <directory relative-to="jboss.server.log.dir"/> </access-log> </virtual-server> </subsystem> 

or you can use the CLI (recommended - use the tab function to find out the available attributes):

 /subsystem=web/virtual-server=default-host/access-log=configuration:add(whatever-attributes-you-want-for-access-log) 

UPDATE based on comment from OP below

If you want to track the content of an HTTP request, you need to enable RequestDumperValve. In JBossAS7 you cannot enable this globally (unlike AS5 or AS6) /. You must enable it for each deployment. Add this line to WEB-INF\jboss-web.xml :

 <valve> <class-name>org.apache.catalina.valves.RequestDumperValve</class-name> </valve> 

Valves do not need access to the access log; it displays information in the server.log file. You can learn more about RequestDumperValve . You may also be interested in RequestFilterValve .

These valves are commonly used for debugging purposes, but not in production. Therefore, keep this in mind as they are quite verbose. Alternatively, you can look at tools like WireShark or Fiddler . If you really want to dig even deeper TCPDumps, this will be the way to go (a word of caution - they are quite large and difficult to analyze).

Hope this helps!

+5
source

All Articles