This example demonstrates how to use advantages of Servlet v3 and how to configure Jersey application with this version of Jersey. JAX-RS resource returns the usual text
The mapping of the URI path space is presented in the following table:
URI path | Resource class | HTTP methods |
---|---|---|
/cat | CatResource | GET |
/dog | DogResource | GET |
Run the example using Jetty as follows:
mvn clean package jetty:run
Go to the URL: