In the courses java, everyone (or at least most people) seemed to have a working eclipse. They always seemed to have a working faces-config (a visual one), and autocomplete in xhtml files (for facelets). Though for autocomplete, we added *.xhtml files on JSP's.
It seems that this was a part I don't know well about eclipse, and it's fairly annoying since I don't know why. When I import a project (either Maven or existing), it always has no facets but java (and that in 1.5 not even 1.6), while it is supposed to be a webproject and have facelets & dynamic web project.
Can I change those facets? It seems to just work when I put java to 1.6, but trying to edit the dynamic web module version from 2.4 to 2.5 (it is standard on 2.4) without running into some troubles. Even after I just made a fresh maven project (with an archtype in commandline), I'm not able to change much about these facets.
What am I doing wrong?
Eclipse functionality is driven by project metadata. If you don't have the right metadata, the projects aren't going to behave correctly.
If you are starting from scratch and creating projects in Eclipse, make sure to place all of the metadata files in your source control system (including everything under [project]/.settings directory).
If you are using Maven to generate your Eclipse project metadata, make sure that you find the Maven plugin that knows about WTP. I don't have a reference, but I know it exists. This will ensure that when Maven generates metadata, it will have the correct metadata for web projects.
Can I change those facets? It seems to just work when I put java to 1.6, but trying to edit the dynamic web module version from 2.4 to 2.5 (it is standard on 2.4) without running into some troubles.
The way facet works is that the facet author can choose not to implement version change logic. Unfortunately the Java EE module facets (such as the dynamic web module) do not have version change implemented. Other facets like Java do support this. So your experience will vary from facet to facet.
If all else fails, you can edit .settings/org.eclipse.wst.common.project.facet.core.xml file by hand. Make sure to do that from Eclipse or you will need to refresh the project afterwards. Just keep in mind that if you are forcing the change like that, you might need to do some manual fixes to your project content. For instance, if you change web spec level, you may need to update the deployment descriptors.