Most software today is very much like an Egyptian pyramid with millions of bricks piled on top of each other, with no structural integrity, but just done by brute force and thousands of slaves.

How to make Eclipse IDE supports JSF 2.0

In Eclipse Ganymede (v3.4) or Galileo (v3.5), it has supports for JSF 1.2 only. For JSF 2.0, it’s recommended to upgrade the Eclipse to the latest version, Helios (v3.6), it has full support of Java EE 6 support, including JSF 2.0.

Here’s a quick guide to show how to enable the JSF 2.0 features in Eclipse project.

1. Eclipse Helios

Download the latest Eclipse IDE for Java EE Developers, Helios (v3.6).

2. Project Facets

To support JSF 2.0, you have to configure your Eclipse project to support Web Tools Platform (WTP).

Steps to enable the Web Tools Platform (WTP) :

  1. Right click on the project, choose “properties” –> “Project Facets“.
  2. Check “Dynamic Web Module“, select version 2.5.
  3. Check “Java“, choose version 1.6.
  4. Check “JavaServer Faces“, choose version 2.0.
  5. Click on the “further configuration…” link below to do the JSF configuration.
  6. Create an user library and include the JSF 2.0 API and implementation libraries, jsf-api-xxx.jar and jsf-impl-xxx.jar.
  7. Done.

3. Demo

Now the Eclipse project is support the JSF 2.0 capabilities. In .xhtml file, click on the “Ctrl + Space“, it will prompts the JSF 2.0 tags (code assist) automatically. Furthermore, it add JSF 2.0 visual components to the web page editor as well.