import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public final class FilterParameter implements Filter
{
private FilterConfig filterConfig = null;
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain)
throws IOException, ServletException
{
System.out.println("The message is: " + filterConfig.getInitParameter("message"));
chain.doFilter(request, response);
}
public void destroy() { }
public void init(FilterConfig filterConfig) {
this.filterConfig = filterConfig;
}
}
FilterUsingParameter.zip( 89 k)