Added more code to get response from Tomcat