Java restful application