This example demonstrates how to develop RESTful web service with CDI managed beans and Grizzly HTTP container.
We suggest you inspect the example source code to get better understanding on various CDI features utilized there. Following table contains some of the published resources that you might want to check.
The mapping of the URI path space is presented in the following table:
URL | Description | Expected Results |
---|---|---|
/helloworld?name=Bill | A hello-world managed bean | Hello Bill |
/app/count | Application scoped resource | request count (incremented with every other request) |
/req/app/counter | Request scoped resource | links to above request counter |
/req/parameterized-async?q=echo%20this | Asynchronous echo resource method that is being JAX-RS intercepted | echo this |
Run the example as follows:
mvn clean compile exec:java
This deploys the example using Grizzly container. You can access the application at: