Skip to content

Latest commit

 

History

History

helloworld-cdi2-se

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

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 path Resource class HTTP methods Notes
/helloworld/{name} HelloWorldResource GET Returns Hello {name}
/counter/request CounterResource GET Returns always 1 (injected always a new instance of counter)
/counter/application CounterResource GET Returns 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.