标签库支持命名空间:http://java.sun.com/jsf/core,但没有为名称定义标签:ajax [英] Tag Library supports namespace: http://java.sun.com/jsf/core, but no tag was defined for name: ajax

查看:27
本文介绍了标签库支持命名空间:http://java.sun.com/jsf/core,但没有为名称定义标签:ajax的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

页面下方

<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<h:form>
    <h:outputLabel id="outtxt" value="#{user.name}"/>
    <h:inputText id="intxt" value="#{user.name}">
        <f:ajax event="keyup" execute="intxt" render="outtxt"/>
    </h:inputTtext>
</h:form>

抛出以下错误

标签库支持命名空间:http://java.sun.com/jsf/core, 但没有为 name 定义标签:ajax

Tag Library supports namespace: http://java.sun.com/jsf/core, but no tag was defined for name: ajax

这是怎么引起的,我该如何解决?

How is this caused and how can I solve it?

推荐答案

仅在 JSF的Facelets标签库.

但是,您使用的是 不推荐使用的 JSP 从 JSF 2.0 开始.所有针对 JSP 的 JSF 2.x 开发都已停止.所有新的 JSF 2.x 特定标签/属性,例如 <;f:viewAction> 等不可用 在JSF的JSP标签库中.您需要将 JSP 迁移到它的后续 Facelets 以利用新的 JSF 2.x 特定标签/属性.另请参阅以下链接,了解有关 Facelets 的更多详细信息:

However, you're using JSP which is deprecated since JSF 2.0. All JSF 2.x development for JSP has stopped. All new JSF 2.x specific tags/attributes such as <f:ajax>, <h:head>, <h:link>, <h:button>, <h:inputFile>, <f:viewParam>, <f:viewAction>, etc are not available in JSP tag library of JSF. You need to migrate JSP to its successor Facelets in order to utilize the new JSF 2.x specific tags/attributes. See also below links for more detail about Facelets:

如果您在一些 JSF 书籍/教程/资源中发现了这个 JSP 示例,那么它很可能是针对 JSF 1.x 的.在学习 JSF 2.x 时,请务必确保您阅读了针对 JSF 2.x 的书籍/教程/资源.我们的 JSF wiki 页面是一个很好的起点.

If you've found this JSP example in some JSF book/tutorial/resource, then it's likely a JSF 1.x targeted one. When learning JSF 2.x, make absolutely sure that you read a JSF 2.x targeted book/tutorial/resource. Our JSF wiki page is a good starting point.

这篇关于标签库支持命名空间:http://java.sun.com/jsf/core,但没有为名称定义标签:ajax的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆