Added logic in the servlet and finished the setup for CDI