A standardized approach would be to implement a ServletContextListener and 
define it
in your web.xml for the web app. It will be invoked before the web app accepts 
any requests
and when the web app is shutdown.

A more "Struts" approach would be to use a PlugIn and define it in your 
struts-config.xml file.

Both of these methods provide you with bootstrapping your web app.

robert

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 30, 2004 5:43 PM
> To: Struts Users Mailing List
> Subject: MVC initialization
>
>
> I know this is a bit off topic, but I figured I could get a better answer 
> here.
>
> I am using Tomcat 4.1 and the latest production build for Struts in an MVC 
> setup and have a large application already in
> production on the web.
>
> I need to enhance the model, but this enhancement will require me to have 
> individual products/services register their
> interfaces with a common model hashmap.
>
> I would like this initialization to be done once at startup, but I am not 
> sure where would be appropriate or where to do
> this.   I don't need to include any properties files or anything, just need 
> to do some initial setup and thought that
> static blocks for each service might be a bad route?
>
> What might be a good approach for this that people who do MVC use?  I know it 
> is a bit off topic, but though you might have ideas.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to