Hi...
you should not use the Filter for the Printing purpose.Filter must be used for Session checking and scanning the the incoming the HttpRequest
in very high security websites.
coming to your Question
when your Filter is fired with URL pattren Automaticlly Server will call the doFilter() Method with Required Arguments
Request and Response chain.
you need to some sort of validations after completion successful the request should go to the Original Resource. like this chain.doFilter(request,response);
if not we will redirct to another page in the doFilter Method only.
response.sendRedrict("error.jsp"); like this..
i hope i gave you the answer if not please rise the Query..
Thanks,
Ramakrishna Rayudu