h:outputScript未在库h中定义 [英] h:outputScript not defined in library h

查看:377
本文介绍了h:outputScript未在库h中定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我迷上了这段代码

<h:outputScript name="jsf.js" library="javax.faces" target="head"/>

但是我的IDE表示<h:outputScript>标签未在我声明如下的库h中定义.

But my IDE says that <h:outputScript> tag is not defined in library h which I declared as below.

<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

这是怎么回事?

推荐答案

JSF 2.0 <h:head><h:body><h:outputScript><h:outputStylesheet><f:ajax>和所有<ui:xxx>标记不是 (当您使用古老的JSP作为视图技术时可用).相反,您应该使用其后继Facelets(通常是XHTML文件).

The JSF 2.0 <h:head>, <h:body>, <h:outputScript>, <h:outputStylesheet>, <f:ajax> and all <ui:xxx> tags are not available when you use the ancient JSP as view technology. You should instead be using its successor Facelets, which is usually a XHTML file.

已弃用JSP作为JSF的查看技术.学习JSF时,请确保您正在阅读最新的资源.从我们的JSF Wiki页面开始.

JSP has been deprecated as JSF view technology since 2009 already. Make sure you're reading up to date resources when learning JSF. Start at our JSF wiki page.

  • Java EE 6 tutorial - Introduction to Facelets
  • Why Facelets is preferred over JSP as the view definition language from JSF2.0 onwards?

这篇关于h:outputScript未在库h中定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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