Untangle try-catch a bit in servlet, to properly catch 404 errors