Hey gang - I managed to hack the Filter to get a ServletContext and then the Spring WebApplicationContext. Thanks to all for the many helpful replies.
Nick wrote: > Cast the request to an http servlet request. That should have > access to the session, which has access to the context.(I think). Correct. That works too, but I stuck with the init() hook because it just seemed like something I'd only need to do once. But here is part two... I now have a Servlet Filter that is coupled to Spring! That seems like a bad thing... I mean, if the whole point of Spring is to allow you to inject different implementations/configurations, shouldn't one strive to be able to replace Spring with another container in the future? So the question now becomes a bit more esoteric (since I have a soln. that works and that gives me a little breathing room)...and perhaps this is obvious to Spring folks, but not to me yet. Can I setup a spring config that injects a DataSource into MyServletFilter class? So rather than have MyServletFilter obtain a Spring context and then ask for a "ds" bean... can Spring just do MyServletFilter.setDataSource(myDataSourceBean) at startup? Timo --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]