Added dispatching logic to the Servlet