You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2018/11/08 23:07:08 UTC

[Bug 62895] load-on-startup of the @WebServlet does not word

https://bz.apache.org/bugzilla/show_bug.cgi?id=62895

richard.gang.li8@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #1 from richard.gang.li8@gmail.com ---
My Servlet is very simple, the Servlet just override the init(ServletConfig)
method

public class TimerServlet extends HttpServlet
{
        public void init(ServletConfig config)throws ServletException
        {
                super.init(config);
                Timer t = new Timer(1000,new ActionListener()
                {
                        public void actionPerformed(ActionEvent e)
                        {
                                System.out.println(new Date());
                        }
                });
                t.start();
        }
}

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org