在Eclipse Indigo上配置JSF 2.0的问题 [英] Problems configuring JSF 2.0 on Eclipse Indigo

查看:283
本文介绍了在Eclipse Indigo上配置JSF 2.0的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用IDE Eclipse Indigo(最新版本)上的JSF 2.0开发Web应用程序。

I'm developing a web application with JSF 2.0 on the IDE Eclipse Indigo (the last version).

但是在项目 - >属性 - > Project Facets ,选项 JavaServer Faces 在版本1.2上配置,当我尝试将版本更改为2.0时,出现错误消息

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


无法将项目方面JavaServer Faces的版本更改为2.0。

Cannot change version of project facet JavaServer Faces to 2.0.

奇怪的是,JSF库中的我的项目都是2.0版本。

Strangely, the JSF libaries in my project are all the 2.0 version.

我认为这是导致我的网页不显示简单的xhtml标签的问题,如< h :outputLabel> < h:inputText>

I think this is the problem that is causing my pages not to show simple xhtml tags like <h:outputLabel> and <h:inputText>.

JSF库我正在使用的是Mojarra项目获得的2.0.6

The JSF libraries that I'm using was obtained on the Mojarra project 2.0.6

希望有人可以帮助我
提前致谢

Hope someone could help me Thanks in advance

推荐答案

这是一个Eclipse的怪癖。另见 Eclipse bug 201792 ,这是从未修复过的。

This is an Eclipse quirk. See also Eclipse bug 201792 which is never been fixed.

更改JSF Facet版本的唯一方法是编辑 /.settings/org.eclipse.wst.common.project.facet的以下行。 core.xml file

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

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

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

除此之外,你也可以完全忽略它。无论如何,改变那个方面的版本对你来说真的没有任何新的魔力。最终的WAR版本仍包含JSF 2.0库,如果您已重新声明< faces-config> / WEB-INF / faces-的根声明config.xml 文件符合JSF 2.0,那么应该没有问题。如果您仍然遇到使用Facelets(XHTML文件,就像您自己说的那样)的问题,那么您应该在这里询问一个新的更具体的问题。

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. 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.

这篇关于在Eclipse Indigo上配置JSF 2.0的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆