tomcat jsp log4j partially working

From: jw (
Date: 12/30/03

Date: 30 Dec 2003 08:49:37 -0800


  I'm just learning log4j and I have a problem that so far I can't
find an answer to in the groups. I've got a bean that I compiled and
can run from the /classes directory that will output log messages to
stdout, FileAppender, and SocketAppender(Lumbermill). However when I
try to run that bean from a Tomcat JSP I only get the log messages to
stdout(console I started tomcat with), and no errors or other
notifications. The files is located under the same
/classes directory as the bean, and i've search directories/jars under
/usr/tomcat for any other file, but no luck. Attached
is my file:

     # ROOT logger stuff. ROOT logger will output messages
     # to stdout, R(file), and LogServer(RemoteServer)
     log4j.rootLogger=debug, stdout, R, LogServer


     # Pattern to output the caller's file name and line number.
     log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) -

     # File Appender(Attached to ROOT logger above
     # Keep one backup file
     log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n

     # LumberMill appender(Sends messages via socket to lumbermill
server @RemoteHost

I'm new to JSP/Servlets and don't have a deployment descriptor(if
that's even needed in tomcat). I've chmod 777 everything under my
web-application's main directory just in case it was a permissions
thing, but still no joy.

Any ideas/help would be appreciated. Thanks in Advance.

Relevant Pages

  • Re: my first bean (tomcat)
    ... I have looked at the Tomcat page you indicate and I do have some idea about the architecture of a webapp and where things should go but I am a bit concerned about some of the other files which need setting. ... I am finding the doc a bit wordy to wade thru and I'd like to see a 'recipe' for getting a Bean going, the main steps, 'cos I seem to be missing/hashing one of them. ... Put the bean's class file in the webapp's WEB-INF/classes directory, or jar it up and put the jar in the webapp's WEB-INF/lib directory. ...
  • myjavaserver
    ... I've an account on myjavaserver and I'start to send my work. ... My problem is that in a page I use a bean, but tomcat can't find the class. ...
  • Application scope variable on startup
    ... I have my own ResourceFactory which returns a bean. ... resource factory in tomcat 5.5 context xm file. ... I would like to create a application scope variable on tomcat startup ...
  • Re: path problem in tomcat
    ... what i mean is if i attach a piece of code inside the bean, ... different with start tomcat from eclipse or start it directly. ...