... until the collector arrives ...

This "blog" is really just a scratchpad of mine. There is not much of general interest here. Most of the content is scribbled down "live" as I discover things I want to remember. I rarely go back to correct mistakes in older entries. You have been warned :)


JBoss/Tomcat Access Logging

To enable a standard web access log for Tomcat, you must uncomment the 'AccessLogValve' directive in the Tomcat server.xml file.  Under JBoss, this file is typically found at:


Note that the valve does not report the authenticated user if you are using the JCIFS NTLM filter.

JCIFS Logging

You can make JCIFS log all authentication attempts by configuring the following filter initialization parameter:


The log level must be greater than two to show logins.


Running JBoss as an XP Service

I used JavaService and the following BAT file:

"%~dp0JavaService.exe" -install JBoss ^
  "%JAVA_HOME%\jre\bin\server\jvm.dll" ^
  "-Djava.class.path=%JAVA_HOME%\lib\tools.jar;%~dp0run.jar" ^
  -start org.jboss.Main ^
  -stop org.jboss.Main -method systemExit ^
  -out "%~dp0jbossservice-stdout.log" ^
  -err "%~dp0jbossservice-stderr.log" ^
  -current "%~dp0." ^

The -out and -err switches are good for debugging, but in normal JBoss operation they simply echo the JBoss server log.  Also, they are not cleared whenever the service is started, so they grow indefinitely.


Jetty Dump Servlet

A convenient on-line debugging tool for HTTP requests is the Jetty Dump Servlet:


It echoes the request, much like SnoopServlet.



By default, JBoss uses a unified class loader model where the JARs from all archives are shared.  This is contrary to the Servlet specification which says that each application should be isolated from the others.  Fortunately, this behaviour can be turned off by changing an entry in server\default\deploy\jbossweb-tomcat50.sar\META-INF\jboss-service.xml:

 <attribute name="UseJBossWebLoader">false</attribute>

As of JBoss 4.0.2, this is the default setting.  See also:




Blog Archive