Thanks for some clues. At least I can think the things I have been trying
should have worked.
Maybe. I forgot to say I am running Tomcat 3.2 with my log4j 1.2 beta. Java
is 1.3. The web-app is configured outside the tomcat directory tree. Had
similar problems with 3.3. Boss says this project will
I handled this a slighly different way, and just added a log4j JSP tag that
took a level, message, and category attributes:
Then the code I get an instance of the category as normal, and theres an if
block checking the level.. works quite well, but doesn't answer your
question...
--On Th
I would recommend:
<% Category slog = Category.getInstance(this.class.getName()); %>
The important part is that _this_ is referencable in a JSP (it's just a Servlet
class anyway).
The static declaration is nice but not all that necessary. There is only one
object for slog anyway, even if you hav
The problem you get is from using a static category in your jsp in that
manner.
Either use a non-static logger, or use the jsp taglibs found in the
jakarta jsp project.
Cheers,
Scott
Joel Rees wrote:
> My initial experiments with 1.1.3 gives me compiler errors when I tried to
> instantiate a ca
My initial experiments with 1.1.3 gives me compiler errors when I tried to
instantiate a category directly in jsp pages. For instance,
<%@ page import="org.apache.log4j.Category" %>
<% static Category slog = Category.getInstance( class.getName() ); %>
...
gives me
org.apache.jasper.JasperExcept