You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Lenny Sorey <lr...@fatdot.com> on 2002/07/11 04:45:38 UTC

log4j-1.2.5.jar

Quick Question:

Where exactly should the log4j-1.2.5.jar be located in order to get it to work 
within Tomcat 4.1.3?

I can get log4j to work with log4j.properties while I run it as a separate servlet
by starting it from a command line with java after I compile it the servlet alone.

I still can't get it to work with Tomcat 4.1.3

My JSP's currently run find and retrieve data.  I really need to place some log4j statement to debug
in some servlets. Any help would certainly be appreciated.

Oh Yeah, The folks from the Loggers4J Users group suggested that I asked this group for help regarding
using log4j with Tomcat.

Platform again:

Windows 2000 Professional
Tomcat 4.1.3
J2SDK 1.4.0
Log4j-1.2.5
Turbine 2.1
velocity-1.2-dev
MySQL 4.0.1-alpha-max-nt

Thanks,

Lenny Sorey






--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: log4j-1.2.5.jar

Posted by Jacob Kjome <ho...@visi.com>.
Hi Lenny,

Well, unless you use the RepositorySelector technique (which I've only 
heard about and don't know how to implement) you will need to put 
log4j-1.2.5.jar in your WEB-INF/lib directory.  You can put your 
log4j.properties in WEB-INF/classes and it should get used the first time a 
new logger is created.

Alternatively, you can set up a servlet to load on startup of your app and 
do initialization manually which can be more flexible.

You can see an example of that by looking at Barracuda, a Servlet 
Presentation Framework which includes a library called "plankton.jar".  It 
contains some generally useful utilities that can be used anywhere...even 
outside the context of Barracuda.  One thing it has in particular is a 
Log4jInit servlet that is very comprehensive (I know because I wrote 
it).  You can use that and then check out Barracuda's web.xml for an 
example of the configuration to initialize the servlet on startup. 
<plug>BTW, you might want to try out Barracuda.  I am a committer to that 
project and can tell you that it is a very compelling framework and an 
alternative to JSP framworks like Struts and such<plug>.

You can download Barracuda at:
http://barracuda.enhydra.org/software/downloads/barracuda-1.1.0.zip

Read about Barracuda here:
http://barracuda.enhydra.org/cvs_source/Barracuda/index_details.html

Jake

At 09:45 PM 7/10/2002 -0500, you wrote:
>Quick Question:
>
>Where exactly should the log4j-1.2.5.jar be located in order to get it to 
>work
>within Tomcat 4.1.3?
>
>I can get log4j to work with log4j.properties while I run it as a separate 
>servlet
>by starting it from a command line with java after I compile it the 
>servlet alone.
>
>I still can't get it to work with Tomcat 4.1.3
>
>My JSP's currently run find and retrieve data.  I really need to place 
>some log4j statement to debug
>in some servlets. Any help would certainly be appreciated.
>
>Oh Yeah, The folks from the Loggers4J Users group suggested that I asked 
>this group for help regarding
>using log4j with Tomcat.
>
>Platform again:
>
>Windows 2000 Professional
>Tomcat 4.1.3
>J2SDK 1.4.0
>Log4j-1.2.5
>Turbine 2.1
>velocity-1.2-dev
>MySQL 4.0.1-alpha-max-nt
>
>Thanks,
>
>Lenny Sorey
>
>
>
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>