tweaking to be able to run it on a local tomcat server too