Slightly simplified case statement and removed test for Servlet 2