Simplified code of JAX-RS tutorial by Christophe Coenraets.