Child pages
  • Dynamic Faces - sample demonstrating dynamic or programmatic UI creation with JSF 2.0 and Facelets
Skip to end of metadata
Go to start of metadata

Dynamic Faces Sample

This sample project demonstrates programmatic usage of JSF.


  • JSF 2.0
  • Facelets



This project is build with Apache Maven:

In order to build the project, just execute

and look in the target directory for the DynamicFaces.war file.

Importing into the Eclipse workspace

The project provides .project and .classpath files for Eclipse. In order to work with this project in Eclipse, you will need to install the m2eclipse plugin:

To import this project into your Eclipse workspace:

  • extract it into some directory in your workspace (ex. dynamicfaces);
  • click File > Import... > General > Existing Projects into Workspace;
  • select project directory;
  • click Finish.

When the project is imported, you may need to update dependencies:

  • right-click on the project;
  • click Maven > Update Dependencies.

You can also download the source code:

  • right-click on the project;
  • click Maven > Download Sources.

Running from Eclipse

You can run this project directly from Eclipse:

  • right click on src/test/java > org.hisrc.hifaces20.demo.dynamicfaces.RunDemoDynamicFaces;
  • click Run As > JUnit Test;
  • a small pop-up window appears;
  • point your browser to;
  • when finished, close the pop-up window.

The RunDemoDynamicFaces class is a pseudo-unit-test which starts the web
application in an embedded Jetty. This pseudo-test can be started directly
from Eclipse as a JUnit test. No additional installation required.

If Eclipse complains that "No tests found...", try the following:

  • cleaning the project in Eclipse;
  • download sources as described in the previous section.


If you have problems or requests concerning this demo project, please use the mailing list:

You may also use my contacts from this page:

  • No labels