Rest API for servlet. Expose your methods for REST use