我正在尝试使用tomahawk,<t:captcha>中的captcha组件。每次加载页面时,都会出现以下错误:
com.sun.facelets.tag.TagException: /tiles/竞争Site.xhtml @112,46标记库支持名称空间:http://myfaces.apache.org/tomahawk,但没有为名称: captcha定义任何标记
我觉得图书馆有问题。我检查了tomahawk,在Tomahawk1.1.7或更高版本中应该支持<t:captcha>。我使用了多个版本(例如1.1.13),但<t:captcha>从未起作用。像<t:inputText>这样的其他标签都很好用。我还导入了batik-awt-util-1.6-1.jar,因为这是captchas所必需的。
也许我的其他图书馆有问题?我不能轻松地交换它们,因为有许多依赖项。下面是他们的名单:
batik-awt-util-1.6-1.jartomahawk-1.1.13.jar谢谢你的帮忙!
发布于 2012-08-09 10:02:11
我刚刚发现了错误。在我们的CMS中,tomahawk.taglib.xml文件不会从包含的JAR中动态部署。我只需要创建一个这样的新条目:
<tag>
<tag-name>captcha</tag-name>
<component>
<component-type>org.apache.myfaces.CAPTCHA</component-type>
<renderer-type>org.apache.myfaces.CAPTCHA</renderer-type>
</component>
</tag>现在,我在tomahawk-1.1.7.jar和batik-awt-util-1.6-1.jar中使用<t:captcha>。
https://stackoverflow.com/questions/11879668
复制相似问题