Re: [Webwork-devel] Spec-compliant Action Startup
Brought to you by:
baldree,
rickardoberg
From: Christoph S. <ch...@sc...> - 2002-03-05 16:09:02
|
Jim...@do... wrote: > > I need to perform some tasks when my servlet is deployed. (My servlet > needs to spawn a Thread) I can't wait until someone decides to invoke > one of my actions. Typically this is accomplished in the init() method > of the servlet. Since we are writing actions in webwork, the servlet > initialization is hidden from us. There are a few solutions that I can > see: > > 1. Add a method signature to webwork.properties that is invoked when > the ServletDispatcher's init method is invoked. > 2. Somehow force an action to be invoked after deployment. (Make an > http call against the servlet in the deployment script - kludgey). > 3. Subclass DispatcherServlet, and override init(). > > Has anyone else run into this problem? Is there a mechanism in web.xml > that will support this? I went with solution 3, and its really extremely simple. Just change the dispatcher class in web.xml. > > jim |