简体   繁体   English

Eclipse xmlns:h =“ http://java.sun.com/jsf/html”无法识别?

[英]Eclipse xmlns:h=“http://java.sun.com/jsf/html” not recognized?

I am having issues with loading the JSF Library in my Eclipse project. 我在Eclipse项目中加载JSF库时遇到问题。

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html">
   <h:head>
      <title>#{msgs.windowTitle}</title>
   </h:head>
   <h:body>
      #{msgs.pageTitle}
      <h:form>
         <h:dataTable value="#{tableData.names}" var="name">
            <h:column>
               #{name.last},
            </h:column>

            <h:column>
               #{name.first}
            </h:column>
         </h:dataTable>
      </h:form>
   </h:body>
</html>

it seems like the xmlns:h="http://java.sun.com/jsf/html" isn't being recognized/resolved ? 似乎无法识别/解析xmlns:h="http://java.sun.com/jsf/html"吗? When I run the index.xhtml file in Eclipse, i get the following output: 当我在Eclipse中运行index.xhtml文件时,得到以下输出:

#{msgs.pageTitle} #{name.last}, #{name.first} 

rather than the expected output data tables from my class files. 而不是我的类文件中的预期输出数据表。

Below is my faces-config.xml: 下面是我的faces-config.xml:

<?xml version="1.0"?>
<faces-config 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-facesconfig_2_0.xsd"
   version="2.0">
   <application>
      <resource-bundle>
         <base-name>com.corejsf.messages</base-name>
         <var>msgs</var>
      </resource-bundle>
   </application>
</faces-config>

Problem solved! 问题解决了! I was actually running the XHTML file rather than the entire project. 我实际上是在运行XHTML文件,而不是整个项目。 Running the entire project works perfectly! 运行整个项目非常完美!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Eclipse - 找不到 uri http://java.sun.com/jsf/html 的 facelet 标签库 - Eclipse - Can't find facelet tag library for uri http://java.sun.com/jsf/html <h:outputtext>标签库支持命名空间:http://java.sun.com/jsf/html,但没有为名称定义标签:outputtext - <h:outputtext> Tag Library supports namespace: http://java.sun.com/jsf/html, but no tag was defined for name: outputtext 在Eclipse WTP中从Tomcat 7迁移到8:绝对uri:http://java.sun.com/jstl/core无法解析 - Migrating from Tomcat 7 to 8 in Eclipse WTP: The absolute uri: http://java.sun.com/jstl/core cannot be resolved <my:foo>标记库支持命名空间:http://java.sun.com/jsf/composite/mycomponents,但没有为name定义标记:foo - <my:foo> Tag Library supports namespace: http://java.sun.com/jsf/composite/mycomponents, but no tag was defined for name: foo NETBEANS 7.4:“未为名称定义任何标记:注册” +“未为命名空间http://java.sun.com/jsf/composite/my_composite_component找到库” - NETBEANS 7.4: “no tag was defined for name: register” + “No library found for namespace http://java.sun.com/jsf/composite/my_composite_component” 我的 web.xml 命名空间从“http://java.sun.com/xml/ns/javaee”移动到“http://xmlns.jcp.org/xml/ns/javaee” - moving from “http://java.sun.com/xml/ns/javaee” to “http://xmlns.jcp.org/xml/ns/javaee” for my web.xml namespace &lt;%@ taglib prefix=&quot;c&quot; uri=&quot;http://java.sun.com/jsp/jstl/core&quot; %&gt; Eclipse photon jdk 10 Tomcat 9 - <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> Eclipse photon jdk 10 Tomcat 9 Docusign java集成有错误“http://java.sun.com/jsp/jstl/core无法解析” - Docusign java integration having error “ http://java.sun.com/jsp/jstl/core cannot be resolved” 绝对URI:无法解析http://java.sun.com/jsp/jstl/core - The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved 无法找到XML模式名称空间的Spring NamespaceHandler [http://java.sun.com/xml/ns/javaee] - Unable to locate Spring NamespaceHandler for XML schema namespace [http://java.sun.com/xml/ns/javaee]
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM