Eclipse IDE : .xhtml code assist is not working for JSF tag
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?

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.

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.

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.









Finally it out! May 15th! Been waiting for many years
Tanks, works perfectly.
Thanks you’ve helped me a lot !! Now my future project at university will be easy to do.
[...] Buradan yard?m ald?m [...]
Excelent, thanks!
Your solution did not work!
I had JSF code completion in Eclipse 3.5, but not in Eclipse 3.6.1.
Seems like Eclipse has past the prime and is only getting worse…
[...] Eclipse IDE : .xhtml code assist is not working for JSF tag This article was posted in JSF2 category. Oracle Magazine – Free Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for Java's developers and DBAs, and more. [...]
Hi, Mkyong.
I just wanted to thank you very much!
I was searching for a decent solution for this problem 2 days after I started developing in JSF 2.0. After many fool bugs caused by typos in xHTML, which are hard and very time consuming to debug, I simply stopped everything until I find something that solve this serious inefficiency.
If I didn’t find your solution, I would really abandon Eclipse and would try NetBeans.
Thanks once more.
Welcome, Eclipse is still the best!
Hi mkyong! I hope you’re fine.
I was following your tutorial step by step but finally I couldn’t do run the code assist for my XHTML.I’m using Eclipse Ganymede, JSF 2.0
Thanks in advance!
Daniel.
Last resort, try upgrade to latest Eclipse Helios (v3.6).