Another thing to remember is the WebSphere itself uses commons logging. So to get JCL messages when running in WebSphere's JRE, you'll need to make some modifications to the WebSphere configuration. This could be why things work one way in a main method (not running in WebSphere's JRE), and a different way in a JSP (which is running in WebSphere's JRE).
Here's an article that explains the process: http://www-1.ibm.com/support/docview.wss?uid=swg27004610 Some have reported that this is still necessary on WAS 6.x, but I've not verified that myself. Jeff Butler >>> [EMAIL PROTECTED] 2/14/2005 10:19:51 AM >>> Hi folks, Great product, thanks for all your hard work! Question about logging what the framework is doing when running an app on WebSphere. I have written and tested code using a simple datasource and running from my main method and I get the War & Peace style logging (love it!) Though when I transfer the same code to a JSP, and switch my datasource from SIMPLE to JNDI, I don't get anything. Any ideas what I am doing wrong? Here's a copy of my log4j properties file: # Global logging configuration log4j.rootLogger=DEBUG, stdout # Console output... log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%5p [%t] - %m%n And here's the code from the JSP: try { SqlMapClient client = SQLMapConfig.getSqlMapInstance(); List list = client.queryForList("getBrandCodes", null ); if ( list.size() > 0 ) System.out.println( "It worked!"); }catch( Exception exception ){ exception.printStackTrace(); }