Problem

Using Eclipse Helios (3.6) and developing JSF 2.0 web application. In .xhtml file, when i pressed on the “Ctrl + Space” combination keys to call the code assist for JSF tag, it prompts nothing? It look like the code assist for JSF tag is not working properly in the .xhtml file extension?

eclipse-jsf-support

Solution

In Eclipse project, you have to make sure the project is supported the WTP and JSF capabilities.

1. Right click on the project, choose properties, select “Project Facets“, make sure the “JavaServer Faces” is checked. Later, click on the “further configuration…” link to configure the JSF capabilities.

eclipse-jsf-support

2. Create an user library and include the JSF API and implementation library, jsf-api-xxx.jar and jsf-impl-xxx.jar. It will add the JSF capabilities to your project.

eclipse-jsf-support

3. Done, in .xhtml file, click on the “Ctrl + Space” keys again, now it prompts the JSF tag code assist properly. Furthermore, it add JSF visual editor to the web page editor as well.

eclipse-jsf-support
Any Java questions or problems? please post at this JavaNullPointer.com forum, see you there ~
[ Read More ] You can find more similar articles at JSF 2 Tutorials