简体   繁体   English

在Eclipse Indigo上配置JSF 2.0的问题

[英]Problems configuring JSF 2.0 on Eclipse Indigo

I'm developing a web application with JSF 2.0 on the IDE Eclipse Indigo (the last version). 我正在IDE Eclipse Indigo(最后一个版本)上使用JSF 2.0开发一个Web应用程序。

But on Project ->Properties -> Project Facets , the option JavaServer Faces is configured on version 1.2 and when I try to change the version to 2.0, an error message apears 但是在Project - > Properties - > Project Facets上 ,在1.2版本上配置了JavaServer Faces选项,当我尝试将版本更改为2.0时,出现错误消息apears

Cannot change version of project facet JavaServer Faces to 2.0. 无法将JavaServer Faces的项目方面版本更改为2.0。

Strangely, the JSF libaries in my project are all the 2.0 version. 奇怪的是,我项目中的JSF库都是2.0版本。

I think this is the problem that is causing my pages not to show simple xhtml tags like <h:outputLabel> and <h:inputText> . 我认为这是导致我的页面不显示简单的xhtml标签的问题,如<h:outputLabel><h:inputText>

The JSF libraries that I'm using was obtained on the Mojarra project 2.0.6 我正在使用的JSF库是在Mojarra项目2.0.6上获得的

Hope someone could help me Thanks in advance 希望有人可以帮助我提前谢谢

This is an Eclipse quirk. 这是一个Eclipse的怪癖。 See also Eclipse bug 201792 which is never been fixed. 另见Eclipse bug 201792 ,它从未修复过。

The only way to change the JSF Facet version is by editing the following line of the /.settings/org.eclipse.wst.common.project.facet.core.xml file 更改JSF Facet版本的唯一方法是编辑/.settings/org.eclipse.wst.common.project.facet.core.xml文件的以下行

<installed facet="jst.jsf" version="1.2"/>

to

<installed facet="jst.jsf" version="2.0"/>

Other than that, you can also just ignore it altogether. 除此之外,你也可以完全忽略它。 Changing the version of that facet really doesn't do any new magic for you anyway. 无论如何,改变那个方面的版本确实对你没有任何新的魔力。 The final WAR build still contains the JSF 2.0 libs and if you have redeclared <faces-config> root declaration of /WEB-INF/faces-config.xml file to comply JSF 2.0, then there should be no problems. 最终的WAR构建仍然包含JSF 2.0库,如果您重新声明了/WEB-INF/faces-config.xml文件的<faces-config>根声明以符合JSF 2.0,那么应该没有问题。 If you still encounter problems with using Facelets (XHTML files, as you say yourself), then you should ask a new and more specific question about that here. 如果你仍然遇到使用Facelets(XHTML文件,就像你自己说的那样)的问题,那么你应该在这里提出一个新的更具体的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM