On Wed, 2003-12-10 at 12:50, Claire Wall wrote: > as i understand it, in order to retrieve the servlet context, you need to > use the ServletConfig to retrieve it like so: > > config.getServletContext() > > > this sounds similar to a problem that i had where i was trying to log > something from a servlet, just used the log() method and it through an > exception pretty much like the one you are experiencing. however, by putting > config.getServletContext().log() it threw no exceptions... > Hmm. It appears that the ServletConfig is only accessible to the init() of a given servlet. Within the init() I can getServletConfig() and it appears not to be null, and I can getServletConfig.getServletContext() but that IS null. So no exception but a null context that leaves me in about the same boat. Calling getServletContext() directly within the init() also gives me null. This happens with and without a call to super.init().
This can't be that hard. Is there some extra step to tying an arbitrary servlet to a webapp context apart from calling it from within that context (eg Action within context calls the new servlet)? Thanks, Oliver --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]