Personally I would say use a ServletContextListener if the structures you are 
creating will be 
shared by several of your Servlets. That way the init is finished before any of 
your Servlets are 
created.

Load-on-startup always feels like a bit of a hack to me ;)

Just my 2c

Steve wrote:
> where you define your servlet in web.xml add <load-on-startup>1</load-
> on-startup>
> 
> <servlet>
>         <servlet-name>MyAppServiceImpl</servlet-name>
>         <servlet-class>my.package.app.MyAppServiceImpl</servlet-class>
>         <load-on-startup>1</load-on-startup>
> </servlet>
> 
> On Jun 10, 6:29 pm, Jamie <[email protected]> wrote:
>> You might try using the servlet configuration 'load-on-startup'
>> setting in your web.xml servlet definition.
>>
>> You could also define your own base class and derive your servlets
>> from that so you at least have the code in one place...
>>
>> Jamie.
>> -----------------------
>> Search for analog and digital television broadcast antennas in your
>> area:http://www.antennamap.com/
> > 
> 

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to