In some cases it can happen that your Eclipse Web Project did not support code completion in a JSP or JSF page.
This happens to me in a JSF Project with MyFaces and Facelets Support. I build up the project using Maven so the project build was sucessfull and the project works well on my server but typing code with Eclipse JSP Editor war extreamly annoying as Eclipse did not support my with code completion.
The reason was that the project facets for my project where broken and also MyFaces Support was not added to Eclipse correctly. Indeed it is necessary to configure the myfaces support in Eclipse manually and I am not sure if I was not intelligent enough or the Eclipse WTP is not so easy to use as I should be.
So follow these steps if you run into a similar problem :
- create a MyFaces Folder localy on your computer (e.g: /home/user/myfaces)
- move the MyFaces libs and tomahawk libs into a subfolder lib/ (e.g:/home/user/myfaces/lib)
- move the tld Files for myfaces and tomahawk in a /tlds subfolder (e.g./home/user/myfaces/tlds)
- Edit the JavaServer Faces LIbraries
- open Window->Preferences
- go to Web and XML > JavaServer Faces Tools > Libraries
- add a new library "MyFaces" with all the jar files moved before to your myfaces/lib folder
- add a new library "MyFacesTLD" with all the jar files moved before to myfaces/tlds folder
- Next edit the Project Facets of your Web Project (Select your project and open >Project Properties > click modify )
- if there is allready available a JavaServerFaces Support - remove JavaServerFaces 1.2
- add JavaServerFaces 1.2. support and press "next" button
- select option "Sever supplied JSF Implemenation" and add the component libraries configured before in the right part of the selection. This is the importend part! And I did not found this dialog after clicking on "finish"
After this stepps code competion works for my JSF Project. Notice that I work with maven and Maven integration in Eclipse is currently not the best. But maybe this instruction will help you...