[CF-14] improve servlet filter perf

If the path is not right, application wont start up because of IllegalArgumentException. I think we are okay.