Hello guys, Can I have something in Java, say set up a time to trigger a program? I'm running a Web program. Can we do that in a Servlet? Thanks in advance.
There's a couple of timers in the API: java.util.Timer and javax.swing.Timer. If you want the server to notify a client you'll have a problem. HTTP is a request-response protocol, so there's no way for the client to know an event has happened on the server short of having the client poll for it.