我在我的J2EE web项目的web文件夹中有一个TLD (标记库描述符)文件。我从课本上复制了TLD文件。在Eclipse中,在taglib行附近,它给出了错误:
根元素之前的文档中的标记必须是格式良好的。
XML/TLD文件:
<?xml version="1.0" encoding="ISO-8859-1" ?>
< taglib 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/web-jsptaglibrary_2_0.xsd" version="2.0">
<tlib-version>1.2</tlib-version>
<uri>DiceFunctions</uri>
<function>
<name>rollIt</name>
<function-class>foo.DiceRoller</function-class>
<function-signature>
int rollDice()
</function-signature>
</function>
</taglib>如何解决此错误?
发布于 2014-05-04 01:15:12
< taglib ....>应该是<taglib .....>
注意<和taglib之间缺乏空间。
https://stackoverflow.com/questions/23451530
复制相似问题