Eclipse:找不到“http://java.sun.com/jsf/core"的标签库描述符使用 JBoss [英] Eclipse: Can not find the tag library descriptor for "http://java.sun.com/jsf/core" using JBoss

查看:39
本文介绍了Eclipse:找不到“http://java.sun.com/jsf/core"的标签库描述符使用 JBoss的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这个问题被问了很多次,因为我搜索了几个小时来寻找解决方案,但从未得到回答(或者至少没有针对我的情况).

I know this question was asked a lot of times, since I searched for hours for a solution, but it was never answered (or at least not for my situation).

我使用的是 Wildfly 8.0(前 JBoss),所以我知道我不需要添加 jstl jar 或 JSF jar,因为 JBoss 已经提供了实现.

I am using Wildfly 8.0 (ex JBoss), so I understand that I do not need to add jstl jars nor JSF jars since the implementation is already shipped with JBoss.

现在,即使告诉 eclipse 使用 Wildfly 运行时库,我也会收到上述错误.我查了一下,jboss-jstl-api_1.2_spec-1.0.4.Final.jar 是库的一部分

Now even when telling eclipse to use the Wildfly runtime libraries, I get the above error. I checked and the jboss-jstl-api_1.2_spec-1.0.4.Final.jar is part of the library

我怎样才能度过难关?我尝试将下载的 jstl 罐子(来自 https://jstl.java.net/)并将它们放在 lib 目录中,但它是不工作.

How can I get through this? I tried putting downloading jstl jars (from https://jstl.java.net/) and putting them in the lib directory but it is not working.

当我使用没有 jstl 实现的 Tomcat 时,将 jars 复制到lib"中非常有效.但对于 Wildfly 则不然(可能是因为 Eclipse 忽略了我放在 lib 目录中的 jar,因为 Wildfly 有自己的 jar?但是为什么我首先会收到错误?我很困惑).

Copying the jars into "lib" works perfectly when I use Tomcat which doesn't have its jstl implementation. But not with Wildfly (maybe because eclipse ignores the jars I put in the lib directory since Wildfly has its own jars? But then why do I get the error in the first place? I am confused).

感谢任何能帮助我解决这个问题的人.

Thanks to anyone who could help me with this.

我忘了说明,即使在我所有的 JSP 上出现这些错误,该项目也能在服务器上完美地构建和运行.这些错误是特定于 eclipse 的,它无法识别 taglib 并在使用这些(eclipse 未知)标签时在 taglib 声明和警告中显示烦人的错误消息.另外,我不能使用代码完成.

I forgot to precise that even with these errors on all my JSPs, the project builds and works perfectly on the server. These errors are eclipse specific, it does not recognize the taglibs and displays annoying error messages at taglib declarations and warnings when using these (unknown to eclipse) tags. Plus, I can't use code completion.

我暂时绕过了这个问题,将独立的 myfaces 和 jstl 库添加到构建路径.我希望 eclipse 使用服务器端可用的 jars.(例如,对于 JPA,我不需要将 hibernate 库添加到构建路径中,我只是告诉 eclipse,JPA 实现 si 在服务器运行时可用,并且它在代码完成和一切方面都运行良好.

I bypassed the problem, for the moment, by adding standalone myfaces and jstl libraries to the build path. I would like though that eclipse uses the jars available on server side. (For JPA for example I did not need to add the hibernate library to the build path, I simply told eclipse that the JPA implementation si available on server runtime and it worked fine with code completion and everything).

推荐答案

好吧,不必添加任何额外的库(服务器不需要的)这里是我除了添加 Wildfly 运行时库之外还必须做的到项目:转到项目/属性/项目构面/Java Server Faces,然后在库类型(而不是用户库)中选择由目标运行时提供的库.

Alright, to not have to add any additional libraries (that are not needed by the server) here's what I had to do in addition to adding the Wildfly runtime library to the project: Go to Project/Properties/Project Facets/Java Server Faces and chose Library Provided by Target Runtime in the library type (instead of a User Library).

这篇关于Eclipse:找不到“http://java.sun.com/jsf/core"的标签库描述符使用 JBoss的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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