Java Reference
In-Depth Information
Clicking on the Enable Contexts and Dependency Injection checkbox has the effect
of creating a file called beans.xml and placing it in the WEB-INF directory of our web
application. The generated beans.xml file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns=""
xsi:schemaLocation=" http://">
When our application is deployed, the presence of this file indicates to the
application server that our application is CDI-enabled.
Typically, just like standard JSF applications, CDI applications use Facelets as their
view technology. The following example illustrates typical markup for a CDI page:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns=""
<title>Create New Customer</title>
Search WWH ::

Custom Search