2

我得到了一些不寻常的异常,如下所示。

Sep 26, 2012 12:09:50 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: <h3>Validation error messages from TagLibraryValidator for c in /Test.jsp</h3><p>null: org.xml.sax.SAXParseException: Element or attribute do not match QName production: QName::=(NCName':')?NCName.</p><h3>Validation error messages from TagLibraryValidator for sql in /Test.jsp</h3><p>null: org.xml.sax.SAXParseException: Element or attribute do not match QName production: QName::=(NCName':')?NCName.</p><h3>Validation error messages from TagLibraryValidator for x in /Test.jsp</h3><p>null: org.xml.sax.SAXParseException: Element or attribute do not match QName production: QName::=(NCName':')?NCName.</p><h3>Validation error messages from TagLibraryValidator for fmt in /Test.jsp</h3><p>null: org.xml.sax.SAXParseException: Element or attribute do not match QName production: QName::=(NCName':')?NCName.</p>

实际上我已经实现了一个自定义标签。

当我使用 taglib 使用该自定义标签时,它工作正常。

<%@taglib prefix="path" uri="PathGenerator"%>

但是当我开始将它与其他 JSTL 标记库一起使用时。它产生上述异常。

<%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql"%>
<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>
<%@ taglib prefix="json" uri="http://www.atg.com/taglibs/json" %>
<%@taglib prefix="path" uri="PathGenerator"%>

谁能帮帮我吗。

4

0 回答 0