eclipse complains: Can not find the tag directory "/WEB-INF/tags/" but it really does exist
I have a Maven2 web module as an Eclipse project (more specifically, SpringSource Tool Suite 2.6). I have a hello.tag in src/main/webapp/WEB-INF/tags. It's just this:
<%@ tag language="java" pageEncoding="ISO-8859-1"%>
Hello World!
I have a Hello.jsp in src/main/webapp. It's just this:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@taglib prefix="fl" tagdir="/WEB-INF/tags/" %>
<fl:hello/>
If I build and deploy the application, everything works as expected. The problem is that Eclipse is reporting a problem with the taglib line. It says:
Can not find the tag directory "/WEB-INF/tags/"
I have already seen a similar question, but the resolution had to do with the projects natures/facets not being enabled and I believe I have all of the natures I need set up in .project:
<natures>
<nature>org.springframework.ide.eclipse.core.springnature</nature>
开发者_开发技巧 <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.maven.ide.eclipse.maven2Nature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
Anyone seen this before or have any ideas what else I should check?
I think this link will help.
http://www.myeclipseide.com/PNphpBB2-viewtopic-t-26040.html
I think you should check to use the XSD definition (web-app_2_4.xsd) for jsp2.0 and Tomcat5.5
for example:
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
Sounds exactly like https://bugs.eclipse.org/bugs/show_bug.cgi?id=338751 .
I cleaned the project by using "Project > Clean..." and it fixed the issue.
精彩评论