Better implementation using jetty