struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Alföldi <>
Subject AW: using log4J with Struts
Date Fri, 30 Mar 2001 22:27:06 GMT
Hi Jon,

we set up a startup servlet, that initializes our application. This is very
simple and basically just calls various init routines. (No subclassing)
After that the ActionServlet is called.

All applications use init.props to get up and running. The same with log4j.
I have attached the routines for startup as well as the configuration for

I really wounldn´t start mixing the ActionServlet with anything else but

Hope this helps.


  -----Ursprüngliche Nachricht-----
  Von: Jon Wilmoth []
  Gesendet: Freitag, 30. März 2001 23:56
  Betreff: Re: using log4J with Struts

  So your suggesting subclassing the default controller,
org.apache.struts.action.ActionServlet, to override only the init method?
Also, I'm not familiar enough with the web.xml format as to be able to
configure the org.apache.log4j.PropertyConfigurator.  How would one do this?

  Jon Wilmoth
    ----- Original Message -----
    From: Tomer Meshorer
    To: ''
    Sent: Friday, March 30, 2001 11:28 AM
    Subject: RE: using log4J with Struts

    Yes, In the init() method of the controller servlet define all your
categories and give them a priority. You may also want to put the categris
in web.xml so you can read them in runtime and thus be able to change the
log detail level (i.e. only ERROR log messages) when you are in production.

    Tomer Meshorer

      -----Original Message-----
      From: Azeem Niazi []
      Sent: Friday, March 30, 2001 11:22 AM
      Subject: using log4J with Struts

      Has anyone used log4J with struts. If so, how did you do it. Do you
need to register log4j with controller servlet?

      Get your FREE download of MSN Explorer at

View raw message