tree: d26b0412863586e0de7438712356bfa3dd566d8a [path history] [tgz]
  1. src/
  2. pom.xml
  3. README.MD
examples/helloworld-cdi2-se/README.MD

Hello World and Counter Example

This example demonstrates Hello World and Counter examples with CDI 2 SE implemented by Weld.

Contents

The mapping of the URI path space is presented in the following table:

URI pathResource classHTTP methodsNotes
/helloworld/{name}HelloWorldResourceGETReturns Hello {name}
/counter/requestCounterResourceGETReturns always 1 (injected always a new instance of counter)
/counter/applicationCounterResourceGETReturns an incremented number (injected always the same counter).

Running the Example

Run the example as follows:

mvn clean compile exec:java

This deploys the example using Grizzly container.