Changes to MainServlet.java