-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi there,
I want to do some initialization stuff on the server startup and not actually when request for application, right now i'm trying to create a servlet with load on startup. But it is not called on startup. When i'm entering the url for that servlet it is called. So is there any way to do this or m i committing some mistake......
Plz reply on this as soon as possible
Thanks.
I think WebAppInit can do it but i want to start a thread for routine DB scan at specific time. So when i created a listener for WebAppInit a started a thread application's execution is suspended till the time the thread finished its work. I want both to run parallely
import org.zkoss.zk.ui.WebApp; import org.zkoss.zk.ui.util.WebAppInit; public class ThreadDemo implements WebAppInit { public void init(WebApp wapp) throws Exception { try { MyThread t = new MyThread(); t.join(); t.start(); while(true) { t.run(); t.sleep(20000); } } catch (InterruptedException e) { e.printStackTrace(); } } }
If you work with spring ?
Asked: 2011-04-14 09:48:49 +0800
Seen: 1,033 times
Last updated: Apr 15 '11
ZK studio and eclipse outline problem
ZK Package configuration problem
Eclipse Autocomplete not working in ZUL files...
Syntax Error mark ... help me!
Manual Installation of ZK Studio
Can't see button text whilst running simple demo
Adding Vbox to Center layout in Java