Thanks Isaac! What if I want to run some initialization on the servlet from another class?
I am working on implementing a communication protocol on top of RPC. I will send messages over RPC which will be handled by message handlers which register with my library/servlet on the server. I'm trying to figure out where I can have the message handlers register with my library. I'll try to have the library send out an event on init(), but I think there must be a better way... Thanks again! -Brad On Jan 8, 11:27 am, "Isaac Truett" <[email protected]> wrote: > Override GenericServlet.init(). > > On Thu, Jan 8, 2009 at 12:20 PM, Brad Larson <[email protected]> wrote: > > > Hello friends, > > > What is the best way to run code on my server when my servlet is > > loaded? I'd like to do some database initialization work which the > > servlet is expecting. I could use a static variable in the servlet to > > see if it is being ran for the first time, and do the init there, but > > that seems like a hack to me. > > > I have googled around and found a couple references to > > ServletContextAttributeListener, but that seems like just as big of a > > hack. Is there a GWT-approved method for doing anything like this? > > > Thanks! > > -Brad --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
