错误:该名称空间不存在标签库 [英] Error: no taglibrary exists for that namespace

查看:102
本文介绍了错误:该名称空间不存在标签库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Netbeans使用Facelets制作Web应用程序.我想将Icefaces用作我的小部件.我收到以下错误消息警告:此页面要求使用XML名称空间 http://www.icefaces.org/icefaces/components 用前缀ace声明,但该名称空间不存在标签库.

I'm trying to use Netbeans to make a web application using facelets. I want to use Icefaces as my widgets. I get the following error message Warning: This page calls for XML namespace http://www.icefaces.org/icefaces/components declared with prefix ace but no taglibrary exists for that namespace.

,并且该控件无法显示.我有一个最简单的文件

and the control fails to appear. I have a most simple file

<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ace="http://www.icefaces.org/icefaces/components"
xmlns:ice="http://www.icesoft.com/icefaces/component"
>
<head>
    <title>Shalom Elias</title>
</head>
<body>
<h:form id="form">
    Shalom
    <ace:dateTimeEntry id="date1" value="#{backing.date1}" renderAsPopup="true"/>
</h:form>
</body>
</html>

web.xml看起来像

The web.xml looks like

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" 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-app_3_0.xsd">
<context-param>
    <param-name>javax.faces.PROJECT_STAGE</param-name>
    <param-value>Development</param-value>
</context-param>
<context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>server</param-value>
</context-param>
<context-param>
    <param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
    <param-value>true</param-value>
</context-param>
<servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<session-config>
    <session-timeout>
        30
    </session-timeout>
</session-config>
<welcome-file-list>
    <welcome-file>welcome.jsf</welcome-file>
</welcome-file-list>

我认为标签库应该在icefaces-compat.jar文件中,该文件可以在类路径上找到.顺便说一句,我用的是ace :,但是用ice:有完全一样的问题.不幸的是,作为新用户,我无法上传目录结构的快照,但jar文件位于web/WEB-INF/classes下,这对我来说很合逻辑.

I think the taglibrary should be in icefaces-compat.jar which is available on what should be the class path. BTW, I used ace:, but ice: has exactly the same problem. Unfortunately, as a new user, I can't upload a snapshot of my directory structure but the jar files are located under web/WEB-INF/classes, which looks logical to me.

问题是:缺少什么?

谢谢,宜兰

推荐答案

将icefaces jar文件放入:

Put the icefaces jar file in:

WEB-INF/lib

代替WEB-INF/classes文件夹.

instead of WEB-INF/classes folder.

这篇关于错误:该名称空间不存在标签库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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