RE: attributes in servletcontext and servletrequest

2005-07-26 Thread Caldarale, Charles R
> 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"

Re: attributes in servletcontext and servletrequest

2005-07-26 Thread David Smith
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

attributes in servletcontext and servletrequest

2005-07-26 Thread Marten Lehmann
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