public class TimerListener
implements javax.servlet.ServletContextListener {
private java.util.Timer timer;
long iVoxCount = 0;
long iMsgCount = 0;
private java.io.InputStream is = null;
public TimerListener() {
System.out.println("初始化成功");
timer = new java.util.Timer(true);
}
public void contextDestroyed(javax.servlet.ServletContextEvent event) {
System.out.println("系统关闭");
timer.cancel();
}
public void contextInitialized(javax.servlet.ServletContextEvent event) {
System.out.println("开始检测");
//System.out.println( event.getServletContext().getRealPath( "/" ) );
timer.schedule( new java.util.TimerTask() {
private HttpURLConnection conn;
public void run() {
try {