ClassLoader.getResourceAsStream looks in the classpath of the JVM to find files. Your webapps web content area is not in the Classpath unless you specifically add it at server start time which I do not recommend.
If that code is in your doFilter() method, its quite surprising that it compiled in first place. Which is the method getServletContext() in your code refreeing to? Do you have such a method of your own in the Servlet class?
The way to get a handle to the ServletContext object in your doFilter() method is through the FilterConfig object, a reference to which you should have saved in your init() method.
After you get a handle to the context object, use the getResourceAsStream() method as mentioned in the previous post.