adding support for running with embedded tomcat - still work in progress as can't run proxy and server at same time