modified server to handle tomcat requests