logo       

Log4J configuration: msg#00063

java.enhydra.general

Subject: Log4J configuration

I'm digging through an issue (quite small) with the deploying of enhydra
apps in a different servlet container as the release-notes.html states.

This is the issue:
At line 592 of HttpPresentationServlet.java you get private
configureLogger(String) method which gets the servlet "ConfFile"
parameter value, extract the directory path from it and try to read a
file named log4j.xml from that directory path. For extracts directory
path of that parameter value it search for String.lastIndexOf("/") and
compare it with String.lastIndexOf("\\") which can result in an empty
directory path if you put only a filename within "ConfFile" parameter in
web.xml (for ex myApp.conf insted of /full/path/to/myApp.conf), this
results in HttpPresentationServlet.configureLogger(String) to look for
log4j.xml file in the "actual current" directory, with "actual current"
i mean the directory from which you start your servlet container
(actually tested only on Tomcat 4.1).

I think it's better to modify that method to check if the "ConfFile"
parameter has _no_ directory path and then try for it to look at WEB-INF
subdirectory of the webapps.

If you care i can provide a patch.

Hope of to have been clear ;)

Regards,
Thelmo


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise