为 JSF 下载 Mojarra 库时,在 Eclipse 中显示错误“zip 文件为空”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/44858251/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 05:42:31  来源:igfitidea点击:

When downloading Mojarra libraries for JSF it is showing error "zip file is empty" in Eclipse

eclipsejsf-2.2mojarra

提问by Arvind Katte

I'm working on JSF project, I'm trying to set up project facets in Eclipse, When I'm downloading Mojarra libraries for JSF2.2 it is giving error message. I'm using Eclipse Neon 2.

我正在处理 JSF 项目,我正在尝试在 Eclipse 中设置项目方面,当我为 JSF2.2 下载 Mojarra 库时,它给出了错误消息。我正在使用 Eclipse Neon 2。

See the below image for more information.

有关更多信息,请参阅下图。

Mojarra libraries

莫哈拉图书馆

Error Message

错误信息

回答by Muhammad Siddique

Adding Mojarra Manually When Eclipse Luna/NEON/Oxygen JSF Download Library Is Empty...

当 Eclipse Luna/NEON/Oxygen JSF 下载库为空时手动添加 Mojarra...

When I was setting up a fresh install of JavaEE on my laptop today, the JSF Download Library would not return any results to download. Some searching suggested that I had to change my proxy settings but since I was not behind a proxy,

当我今天在我的笔记本电脑上设置全新安装的 JavaEE 时,JSF 下载库不会返回任何下载结果。一些搜索表明我必须更改我的代理设置,但由于我不在代理后面,

Actually some sorts are saying temporarily / Website is offline that's why its not downloadable ...

实际上有些人暂时说/网站离线,这就是为什么它不可下载......

If this problem is happening try out this

如果这个问题发生了试试这个

it would not help me. Lucky enough, JSF are just another bunch of jars that can be added to a user library.

这对我没有帮助。幸运的是,JSF 只是另外一堆可以添加到用户库中的 jar。

You can download the JSF Scroll down here for newest versions of JSF jars...

您可以在此处下载 JSF 向下滚动以获取最新版本的 JSF jar...

Download JSF API JAR JSF API jar file

下载 JSF API JAR JSF API jar 文件

Download JSF IMPL JAR JSF IMPl jar file

下载 JSF IMPL JAR JSF IMP jar 文件

Then simply; click the “Manage Libraries”icon on the JSF capabilities page click “New”and name your library

然后简单地; 单击JSF 功能页面上的“管理库”图标 单击“新建”命名您的库

click“Add external jars” and browse to the jars you downloaded

单击“添加外部 jars”并浏览到您下载的 jars

Name your libraries that you can take back your jars files

命名您可以收回 jars 文件的库

When jars are added then use your jsf as it is...

添加 jar 后,按原样使用您的 jsf...

Finally you are fully featured to the JSF Mojjara Library

最后,您将全面了解 JSF Mojjara 库

Thanks...

谢谢...

回答by Arvind Katte

I have downloaded javax.faces.jar file from maven repository. Added that jar file to classpath, now it is working fine.

我已经从 Maven 存储库下载了 javax.faces.jar 文件。将该 jar 文件添加到类路径,现在它工作正常。

javax.faces.jar

javax.faces.jar

回答by David Garay

I found other sotution, when you start a new dynamic Web proyect pick "New runtime", then Oracle>Glassfish, install it and restart eclipse, JSF library is probided by Glassfish so in JSF Capabilities panel (when the new proyect is created) , glassfish is assigned by default (the System library). it works for me :)

我发现了其他解决方案,当您启动一个新的动态 Web 项目时,选择“新运行时”,然后 Oracle>Glassfish,安装它并重新启动 eclipse,JSF 库被 Glassfish 禁止,因此在 JSF 功能面板中(创建新项目时), glassfish 是默认分配的(系统库)。这个对我有用 :)