> -----Original Message-----
> From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] 
> 
> ServletContext sc = this.servlet.getServletContext();
> Object obj = sc.getAttribute( "nameOfObject");

I'm doing this in a startup servlet:

propFile = getServletContext().getRealPath(clubPropFileName);
Properties properties = new Properties();
properties.load(new FileInputStream(propFile));
getServletContext().setAttribute("clubProps", properties);
System.out.println("Club properties initialised!");

This is all in a try/catch and I do see the println in the console, so I
assume it has worked.  When I try and access the properties object
stored in the context from my Struts action as suggested I get a
NullPointerException.  Any ideas why?

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

Reply via email to