I’m currently using Spring Source Tools 2.9.1 – but I had the same issue with standard Eclipse J2EE distribution.
I’m writing java web application with jsp views.
To better reuse code I have created some tags – *.tag files in WEB-INF\tags folder
Example of enum.tag file:
<jsp:root version="2.0"
xmlns:form="http://www.springframework.org/tags/form"
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:spring="http://www.springframework.org/tags"
xmlns:tags="urn:jsptagdir:/WEB-INF/tags"
xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<jsp:directive.tag pageEncoding="UTF-8" />
<jsp:directive.attribute name="value" required="true" rtexprvalue="true" type="Object" />
<jsp:directive.attribute name="cssClass" required="false" rtexprvalue="true" />
<span class="enum ${value.cssClass} ${cssClass}">
<span class="message">
<spring:message code="${value.name}" />
</span>
</span>
</jsp:root>
If I use this tag in my jsp the tag is reckognized by validator, but the tag attributes are not.
so I get warning for this line of jsp
<tags:enum value="${t.state}" />
warning:
Undefined attribute name "value"
tag nemaspace is initialized with:
xmlns:tags="urn:jsptagdir:/WEB-INF/tags
How to setup eclipse to properly validate tagdir’s tags?
I use XML version of jsps (and tags) – all teh fiels are valid XML documents, it uses syntax like
I now realized and checked that I need to use tagx extension (alongside jspx). With this change Eclispe validation works well.