24. Running the Basic Contexts and Dependency Injection Examples

This chapter describes in detail how to build and run simple examples that use CDI. The examples are in the tut-install/examples/cdi/ directory.

To build and run the examples, you will do the following.

1. Use NetBeans IDE or the Maven tool to compile and package the example.

2. Use NetBeans IDE or the Maven tool to deploy the example.

3. Run the example in a web browser.

See Chapter 2, “Using the Tutorial Examples,” for basic information on installing, building, and running the examples.

The following topics are addressed here:

Image The simplegreeting CDI Example

The guessnumber-cdi ...

Get The Java EE 7 Tutorial: Volume 1, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.