maiolum.servlets
Class Log4jInitializationServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended bymaiolum.servlets.Log4jInitializationServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class Log4jInitializationServlet
extends javax.servlet.http.HttpServlet

Retrieves filesystem location of log4j external configuration file (*.lcf) from deployment descriptor file. Typically, definition of Log4jInitServlet in web.xml should be as follows:

 
    <servlet>
      <servlet-name>LoggerInitServlet</servlet-name>
      <servlet-class>maiolum.Log4jInitServlet</servlet-class>
 
      <init-param>
        <param-name>log4j-init-file</param-name>
        <param-value>WEB-INF\classes\log4j.lcf</param-value>
      </init-param>
 
      <load-on-startup>1</load-on-startup>
    </servlet>
  
 

See Also:
Serialized Form

Constructor Summary
Log4jInitializationServlet()
           
 
Method Summary
 void init()
          Retrieves parameter value from deployment descriptor and passes it to org.apache.log4j.PropertyConfigurator object.
 
Methods inherited from class javax.servlet.http.HttpServlet
service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Log4jInitializationServlet

public Log4jInitializationServlet()
Method Detail

init

public void init()
Retrieves parameter value from deployment descriptor and passes it to org.apache.log4j.PropertyConfigurator object.