Hi Jim, could you detail on this? I am not really familiar with Spring and at first sight it looks much too mighty for just some little initialization, but maybe its providing the hook I am looking for.
Martin ----- Original Nachricht ---- Von: Jim Kiley <[EMAIL PROTECTED]> An: Struts Users Mailing List <user@struts.apache.org> Datum: 16.05.2008 14:30 Betreff: Re: [struts2]how to configure the web app > Hi Martin, > > This seems like an ideal situation for using Spring dependency injection. > Are you familiar with Spring at all? > > jk > > On Fri, May 16, 2008 at 8:04 AM, <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > I am new to Struts2 and stumbling immediately. > > > > I want to have an initialization routine in my web app which will connect > > to a data base etc. at startup time. This routine needs some parameters > (e. > > g. the path of a config file to be read). How can I access such external > > information? > > > > With Servlets I would normally implement a ServletContextListener which > > would get its information as an init-param from web.xml. > > But for Struts2 there is no <servlet> spec where I could put it. > > > > Writing Struts1 applications I typically utilized a plugin which could > read > > parameters from struts-config.xml. Maybe this is still possible, but the > > Struts2 plugin mechanism seems to be too powerful (or just overwhelming) > for > > me. > > > > What is the preferred way? > > > > Thanks > > > > Martin > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > Jim Kiley > Technical Consultant | Summa > [p] 412.258.3346 [m] 412.445.1729 > http://www.summa-tech.com > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]