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

查看:681
本文介绍了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 jars(从 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时,将罐子复制到"lib"中的效果很好.但是不支持Wildfly(可能是因为Eclipse因为Wildfly有自己的jar,所以eclipse忽略了我放在lib目录中的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并在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使用服务器端可用的jar. (例如,对于JPA,我不需要将hibernate库添加到构建路径中,我只是告诉eclipse,JPA实现可在服务器运行时上使用,并且在代码完成和其他所有方面都可以正常工作.)

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运行时库外,这是我必须要做的到项目: 转到 Project/Properties/Project Facets/Java Server Faces ,然后在库类型(而不是用户库)中选择 Target Runtime提供的库.

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天全站免登陆