JAX-RS Basics 2

Topics 

  • Sub resource locators 
  • Building URIs 
    • UriBuilder, UriInfo classes 
  • Exceptions 
    • WebApplicationException, ExceptionMapper classes 
  • Security 
    • @Context, SecurityContext class 
  • Deployment options 
  • Web app or Java SE app

Sub-Resource Locators

What is Sub-resource locator? 

  • Sub-resource locator is a method 
    • Annotate d with @Path but Not annotated with @GET or @POST 
    • Returns a sub-resource, which itself contains methods with @GET or @POST annotations
  • Sub-resource locators support polymorphism 
    • A sub-resource locator may return different sub-type resource depending on the request (for example a sub-resource locator could return different sub-type resource dependent on the role of the principal that is authenticated).

You must have an active subscription to download PDF and Lab Zip of this course topic.Please click the "Subscribe" button or the "Login" button if you already have an account.