How about:
public void init(FilterConfig config) throws ServletException {
this.filterConfig = config;
}
public void doFilter(ServletRequest req, ServletResponse r,
FilterChain chain) throws IOException, ServletException {
...
filterConfig.getServletContext();
...
}
On Tue, Sep 24, 2002 at 12:28:58PM -0400, Marc-andre Thibodeau wrote:
> Hi,
>
> Is there a way to get a reference to the ServletContext from the
> doFilter() method of a Filter in order to get an attribute in it? (just
> like servlet.getServletContext.getAttribute("attributeName"); in a
> servlet...) I already searched the archive but found nothing on this
> subject.
>
> MA
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
--
Dror Matalon
Zapatec Inc
1700 MLK Way
Berkeley, CA 94709
http://www.zapatec.com
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html