>
> First:  when should I configure Log4J?  My Log4J experience, unfortunately,
> far outweighs my JSP/servlet experience, but I'm guessing that all I need to
> do is use a DOMConfigurator within the init() method of the first servlet
> that gets loaded.  (The web app's web.xml specifically requests that the
> servlets are loaded on startup, and specifically lists in which order they
> should be loaded.)  Does this sound like a reasonable approach?

Like Robert, I go for the default initialization. Place the log4j.jar in the
WEB-INF/lib and place the log4j.properties in WEB-INF/classes and default
initialization works fine. This requires 1.1.3, since before then there were
some problems with default initialization in web apps.

>
> Next question:  has anybody made logging requests from within a JSP error
> page?  By "error page," I'm referring to a JSP that sets isErrorPage="true"
> within its <%@ page %> directive.  I'd like to do this, to ensure that
> exceptions get logged.  Again... does this sound like a reasonable approach?

I haven't done this, but the Jakarta Taglibs project has a Log taglib that is
based on log4j.
http://jakarta.apache.org/taglibs/index.html I assume that would have what you
need.




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to