* Craig R. McClanahan <[EMAIL PROTECTED]> [1125 20:25]:

> > Lovely, that's the sort of mechanism I was looking for - is it portable
> > between servlet containers though?
 
> ServletContextListener is indeed portable to any Servlet 2.3 or later
> container.
> 
> APIs that start "java." or "javax." are portable (although sometimes
> version specific), while APIs that start "org.apache." are not portable.

Right, thanks. It's more elegant, so is probably The Right Thing...
 
> > For the record, the load-on-startup hack works pretty well. Cheers.
 
> Load-on-startup is indeed a hack (although it's about the only way to do
> this for pre-Servlet-2.3), because there is no guarantee that the servlet
> container will leave your servlet in memory for the lifetime of the web
> application.

Damn, I was folowing all this up until you said that :)

Unless I've got this back-asswards, once the Attribute is saved in
the ServletContext ( which happens in init() ), won't it stay there?
I thought that was the point of a ServletContext?
        Sure, it'll vanish when the server restarts, but if the
WorkAround servlet init() method replaces it during 'load-on-startup',
it shouldn't matter, should it?

-- 
Rasputin :: Jack of All Trades - Master of Nuns

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

Reply via email to