找不到JSF2.0标签 [英] JSF2.0 tags not found

查看:100
本文介绍了找不到JSF2.0标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我一直在使用JSF2.0 + Richface 3.3.3,我正在使用STS作为我的IDE和Maven来构建我的项目,但是不知何故我无法使以下JSF2.0标记起作用:

Recently I've been playing around with JSF2.0+Richface 3.3.3, I'm using STS as my IDE and Maven to build my project, but somehow I can't get the following JSF2.0 tags to work:

  • h:button
  • h:link
  • f:元数据
  • f:viewParam(这是我的STS自动完成功能识别的唯一内容)

它在运行时失败,因为它找不到X组件.

It just fails during runtime saying it can't find X component.

我确实有jsf-api-2.0.2,jsf-impl-2.0.2,richfaces-api-3.3.3.final,richfaces-impl-jsf2-3.3.3.final,richfaces-ui-3.3. 3.final,jsf-facelets-1.1.15,jstl-1.0以及明显的"xmlns:f ="http://java.sun.com/jsf/core" xmlns:h ="http://java.sun. com/jsf/html"中的每个.xhtml文件中,我是否缺少某些内容?

I do have jsf-api-2.0.2, jsf-impl-2.0.2, richfaces-api-3.3.3.final, richfaces-impl-jsf2-3.3.3.final, richfaces-ui-3.3.3.final, jsf-facelets-1.1.15, jstl-1.0 and obviously "xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" in every .xhtml file, am I missing something?

这是我得到的确切错误:

This is the exact error I'm getting:

<h:button> Tag Library supports namespace: http://java.sun.com/jsf/html, but no tag was defined for name: button

@好的,没关系,我的队友发现这是因为我们正在使用一些外部面,并且我们必须等待RichFaces4.0 ...

@ ok nevermind, my teammate found out that its because we're using some external facelets and that we have to wait for RichFaces4.0...

推荐答案

您是否删除了旧的jsf 1.2库? 检查您的WEB-INF/lib以查看是否没有JSF 1.2库的踪迹.

have you removed the old jsf 1.2 libraries? Check your WEB-INF/lib to see that there is no trace of JSF 1.2 libs.

还请记住,您应该将faces-config文件更新为2.0

Also remember that you should update your faces-config file to 2.0

<faces-config version="2.0" xmlns="http://java.sun.com/xml/ns/javaee"
 xmlns:xi="http://www.w3.org/2001/XInclude"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">

启动servlet时,它会说些什么:INFO: Initializing Mojarra 2.0.2 (FCS b10) for context '/nameofyourapplication'(如果您使用的是JSF的Sun实现)

Does it say something when starting the servlet: INFO: Initializing Mojarra 2.0.2 (FCS b10) for context '/nameofyourapplication' (in case you are using Sun implementation of JSF)

这篇关于找不到JSF2.0标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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