servlet init



   
        BootServlet
        BootServlet
        BootServlet
        testweb.servlet.BootServlet
  2
 

 
  BootServlet
  /BootServlet
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

public void init() throws ServletException
    {
        super.init();
        // TODO Auto-generated method stub
        dMsg.info("###BootServlet: execute init");
       
        TimerService ts=TimerService.getInstance();
        dMsg.info("###BootServlet: have got timerservice="+ts);
        for(int i=0;i<100;i++){
            TimerTask task=new MyTimerTask(""+i);
            dMsg.info("###BootServlet: have created timertask="+task);
            try
            {
                ts.addTask(task, null, -1, 10*1000);
            }
            catch (Exception e)
            {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }
        dMsg.info("###BootServlet: after addtask");
       
       
    }

你可能感兴趣的:(servlet,exception,application,encoding,null,web)