How can I have a single time initialization on a server side of GWT app?
I may be thinking to much like HttpServlet where you can override init()
You can add like mentioned in a comment a ServletContextListener.
public class ServerConfig implements ServletContextListener {
public void contextInitialized(ServletContextEvent event) {
// Do stuff on startup.
}
public void contextDestroyed(ServletContextEvent event) {
// Do stuff on shutdown.
}
}
Now put the new class on the server side, you also ave to register the Listener in your web.xml file :
path.to.class.ServerConfig