> From: Marten Lehmann [mailto:[EMAIL PROTECTED]
> Subject: attributes in servletcontext and servletrequest
>
> within the init() of a filter, I'm storing a reference to the
> servletContext:
>
> filterConfig.getServletContext().setAttribute("servletContext"
A better way to handle this stuff is to just get the servlet context
when you need it and not store it in the request. If you have access to
the request, you have access to the servlet context.
ie ServletContext servContext = request.getSession().getServletContext() ;
--David
Marten Lehmann wro
Hello,
within the init() of a filter, I'm storing a reference to the
servletContext:
filterConfig.getServletContext().setAttribute("servletContext",
filterConfig.getServletContext());
But when I'm trying to access this attribute in the doFilter-method, I
get a NullPointerException:
Servl