标记库支持名称空间: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

查看:260
本文介绍了标记库支持名称空间: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 ,但未为名称定义标签: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?

推荐答案

<f:ajax>仅在但是,您正在使用 已弃用的JSP 自JSF 2.0起. JSP的所有JSF 2.x开发都已停止.所有新的JSF 2.x特定标记/属性(例如<f:ajax><h:head><h:link><h:button><h:inputFile><f:viewParam><f:viewAction>等)都不可用

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:

  • Our Facelets wiki page
  • How to include another XHTML in XHTML using JSF 2.0 Facelets?
  • Migrating from JSF 1.2 to JSF 2.0
  • Why Facelets is preferred over JSP as the view definition language from JSF2.0 onwards?

如果您在某些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天全站免登陆