This is my only filter and it applies to all servlet and jsp. If "condition 1" is met, I want it directly go to destination page. If "condition 2" is met, I want it forward to another page; otherwise, I continue the filter logics in another method "doFilter2".
What is causing trouble is the "filterChain.doFilter()" in the 2nd method "doFilter2". Sometimes it does not work well. it sometimes gives me
Do I have to split this "doFilter" and "doFilter2" into two Filter classes and let "doFilter2"'s logics reside in the second filter ? Is there anything fundamentally wrong with my current approach of using one filter ?