![]() Package import import .rs.client.Client import .rs.client.ClientBuilder import .rs.client.Entity import .rs.client.WebTarget import .rs.core.Form import .rs.core.MediaType import .rs.core.Response import .rs.core.UriBuilder import .ClientConfig import. Sets the path to base URL + /hello ( "/hello" ) public class Hello ![]() ![]() The browser requests per default the HTML MIME type. You need to register Jersey as the servlet dispatcher for REST requests. Using the annotation, it defines that it can deliver several MIME types, // text, XML and HTML. See Eclipse WTP development for an introduction into creating web applications. Package import .rs.GET import .rs.Path import .rs.Produces import .rs.core.MediaType // Plain old Java Object it does not extend as class or implements // an interface // The class registers its methods for the HTTP GET request using the annotation.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |