package frame.server; import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextListener; import org.apache.log4j.PropertyConfigurator; import frame.config.Configer; public class ContextListener implements ServletContextListener { public ContextListener() { } public void contextInitialized(ServletContextEvent event) { Configer.init(event.getServletContext()); PropertyConfigurator.configure(Configer.getPath_LoggerConfig()); ServerInstance.startService(); } public void contextDestroyed(ServletContextEvent arg0) { ServerInstance.stopService(); } }