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... ----- Original Message ----- From: "Oliver Meyn" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Wednesday, December 10, 2003 5:41 PM Subject: Re: getServletContext() throws null pointer > On Wed, 2003-12-10 at 12:18, Richard Yee wrote: > > Oliver, > > Are you overriding init(ServletConfig config) in your > > init servlet? If so, did you call super.init(config) > > before you tried accessing the ServletContext? > > > I'm not overriding init(config) but I am overriding init(). I hadn't > been calling super.init() but gave that a shot and no change. I am able > to access the ServletContext (and the init-ed object) from both my > controlling Action and from a jsp - just not from another servlet. I > must be missing something simple yet fundamental... > > Thanks, > Oliver > > > > --------------------------------------------------------------------- > 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]