The problem is not in the property file, but rather that the servlet doesn't
know where to find the property file.
There are two parts - making sure the servlet reads the file, and second,
telling the servlet where to look.
1) This tells the configurator to read the property file when the
Howdy,
You're probably outputting log4j statements before the log4j system is
configured. You need to make sure you call something like
PropertyConfigurator.configure(your config file path) before making any
log4j statements. A good place to do this is in the init() method of a
servlet that you
i followed the instruction from the log4j documentation and put in my
web.xml file the following for the servlet:
servlet
servlet-nameTallyTeset/servlet-name
servlet-classroster.TallyTest/servlet-class
init-param
param-namelog4j-init-file/param-name
Howdy,
public void init(ServletConfig config) throws
ServletException{
super.init(config);
prefix = getServletContext().getRealPath(/);
file = getInitParameter(log4j-init-file);
System.out.println(Prefix: + prefix);