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" %>
<html>
<% static Category slog = Category.getInstance( class.getName() ); %>
...

gives me

org.apache.jasper.JasperException: Unable to compile class for
JSPD:\jakarta\tomcat-3.2.4\work\localhost_8080%2FNakaiSample\_0002fHXJTestMe
nu_0002ejspHXJTestMenu_jsp_11.java:64: '}' no statement
                out.write("\r\n\r\n");

                                            ^

etc. in the browser. I note that not referencing a class name in the
instantiation would probably cause me problems, but I haven't yet figured
out where to look up the class name that jsp pages operate under.

I have been able to build a little class that the jsp page imports, and log
through that class (but have not been able to configure the class). I had to
use static initialization in that class.

Is it possible to directly instantiate a category or logger  in a jsp page?
If so, could someone show me where to look in the docs? (I looked but I
probbaly missed a lot.)

Joel Rees



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

Reply via email to