ported solution for issue #65 by @saladinkzn to gretty-runner-jetty7