Eclipse can't find tag lib descriptor for JSF project being imported from CVS
I'm trying to import a project from CVS for the first time and I'm receiving the error "Can't find tag lib descriptor for " I'm receiving it for both of the taglib lines below. Any ideas on what I can do to troubleshoot this?
Snippet from one of the JSP's.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ page contentType="text/html;charset=windows-1252"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%开发者_如何学Python>
As @BalusC said, my option is associate your dynamic web project. You can do it in your project properties, click on project facets and add JSF. You can check this eclipse instructions:
http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.jst.jsf.doc.user%2Fhtml%2Ftasks%2Fadd_jsf_facet.html
The project apparently didn't contain any JSF libraries. That can happen when the project is targeted on a runtime (a servletcontainer) which already ships with JSF libraries bundled. For example, Tomcat doesn't ship with JSF libraries bundled, but Glassfish, JBoss AS, Websphere, etc do.
You have 2 options:
Manually download the desired JSF library (as you're using legacy JSP as view technology, I guess you need JSF 1.2 not 2.0), extract the zip, grab the
jsf-api.jar
andjsf-impl.jar
files and drop them in/WEB-INF/lib
folder.(Re)associate your dynamic web project with a target runtime which has JSF ilbraries bundled. Rightclick the project, choose Properties and configure the Targeted Runtimes entry.
Either way, Eclipse will do the needed magic to resovle this error.
精彩评论