The convention of using <x>.class or <x>.class.getName() is a convention that many or 
most people follow, but it's not a hard an fast rule.
Just use a different scheme for naming the Category.
e.g. for a file x.jsp, I've used something like
       private static Cateory cat = Category.getInstance("jsp.x");
or
       private static Cateory cat = Category.getInstance( <web app name> + ".jsp.x");
or something similar.

Mitchell Ackermann

----- Original Message ----- 
From: Tom Bednarz <[EMAIL PROTECTED]>
To: log4j user list <[EMAIL PROTECTED]>
Sent: Thursday, October 11, 2001 9:38 AM
Subject: Using log4j in JSP's


Hello,

Can log4j be used in JSP's? If so how?

The problem is, that I have to do something like:

class myClass
{
       static Cateory cat = Category.getInstance(myClass.class);
       ........
}

The problem is, that I do not know the name of the class since it is 
generated by the jsp compiler. I currently use jRun. A JSP named myPage 
will become jrun__myClass2ejspb. This is for sure different when I use a 
different application server.

Has anybody a suggestion how this problem could be solved?

Thomas


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



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

Reply via email to