Filter servetcontext gives null values

Hi,

I have initialized a couple of HashMaps in the servletcontext object in one of my servlets init methods which is then loaded at startup. I have tried to access the HashMaps in my filter using config.getServletContext() but I always get NULL values. When I try to access the HashMaps from other servlets on my app, I get the values. From what I have read there is only one servletcontext in the entire app, does anyone know what is going on here?

IN SERVLET

context.setAttribute(CachedPagesList, myHashMap);

IN FILTER

HashMap hm= (HashMap) context.getAttribute(CachedPagesList);

Thanks!

IP

[642 byte] By [nemcovaa] at [2007-11-27 8:11:30]
# 1
well what happens when you try((HttpServletRequest)request).getSession(false).getServletContext()in your doFilter(ServletRequest request,ServletResponse response) method ?
RahulSharnaa at 2007-7-12 19:55:32 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Nope, that didn't work. Thanks though...
nemcovaa at 2007-7-12 19:55:32 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...