I have a servlet filter with a try/catch. In the exception catch I use a sendRedirect to my error.jsp. But that doesn't work --- the sendRedirect invokes the filter again --- and that fails again --- and that sends another redirect .... and on and on and on.
I know I can use response.sendError(..) but that doesn't give me my pretty error page.
Just to let you know : in a recent servlet specification( if i remember well 2.4) there is a way to configure your filter to be trigger on a forward or not (this is done in the web.xml file). I think the default behaviour is the the filter is not trigger on a forward !
another possibility is to configure your filter mapping in a way that it will not be triggered for error.jsp file.
i hope this will help you ! [ July 07, 2006: Message edited by: Benjamin Leonard ]