Error using JSF 2.1 with JSP 2.0: Unable to read TLD from JAR file

人盡茶涼 提交于 2019-12-11 01:00:49

问题


I try to use JSF 2.1 within JSP 2.0.

When I add this <%@taglib uri="http://java.sun.com/jsf/html" prefix="h" %>

I get the following error:

Unable to read TLD "META-INF/html_basic.tld" from JAR file
    "file:/home/fadhel/.m2/repository/javax/javaee-web-api/6.0/javaee-web-api-6.0.jar":
org.apache.jasper.JasperException: PWC6169:
    Failed to load or instantiate TagLibraryValidator class: com.sun.faces.taglib.html_basic.HtmlBasicValidator.

Can someone tell what I can do to use JSF 2.1 and JSP 2.0 with Java 6?


回答1:


I believe that particular Maven library is provided only for Java compilation. You can't use it at runtime (even for unit tests.) If you are getting this running against a server, make sure the dependency is marked as provided.

If you wish to load the library you will have to depend on a real API. Since there tends to be more than one implementation of just about every Java EE API you will have to research and choose these yourself.

Look for blog posts like this one to resolve your particular problem.



来源:https://stackoverflow.com/questions/12015433/error-using-jsf-2-1-with-jsp-2-0-unable-to-read-tld-from-jar-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!