improve HttpServlet implementation