Paul,
Thanks for the quick response.
For the first part, I have log4j.xml location in web.xml and I am using following code in the listener to load the xml
String log4jConfigLocation = context.getInitParameter("log4j.configuration");
URL log4JConfigURL = context.getResource(log4jConfigLocation);
DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
Document
doc = docBuilder.parse(log4JConfigURL.openStream());
DOMConfigurator conf = new DOMConfigurator();
conf.doConfigure(doc.getDocumentElement(), hierarchy);
and I do have my DTD in the root of my web app where log4j.xml also resides. Then why would it look for dtd under \websphere6\appserver\bin?
The same thing with appender, the issue is it doesn't write the log file under my web app root directory but under \websphere6\appserver\bin ??
Thanks in advance again.