ตัวอย่าง log4j init
public class Log4jInit extends HttpServlet { private static Logger logger = Logger.getLogger(Log4jInit.class); /** * */ private static final long serialVersionUID = -6217487447859906018L; private static final String CONTENT_TYPE = "text/html"; // Initialize global variables @Override public void init() throws ServletException { File f = new File( getInitParameter("log4jPropsFile")); if (!f.canRead()) { throw new ServletException("Init log4j Exception"); } logger.debug("Init log4j file = " + f.toString()); String log4jProp = f.toString(); ...