Eclipse can not find the tag library descriptor for http://java.sun.com/jsf/*
2024-10-20 03:29:40
问题页面:
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ page import="java.util.Calendar"%>
<%@ page import="java.text.SimpleDateFormat"%>
<link href="css/table-style.css" rel="stylesheet" type="text/css" />
<html>
<f:view>
<head>
<title>JSF 2.0 + Spring + Hibernate Example</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<h1>JSF + Spring + Hibernate</h1>
<h:form>
<h:dataTable value="#{customer.customerList}" var="c"
styleClass="order-table" headerClass="order-table-header"
rowClasses="order-table-odd-row,order-table-even-row"> <h:column>
<f:facet name="header">
<h:outputText value="Customer ID" />
</f:facet>
<h:outputText value="#{c.customerId}"></h:outputText>
</h:column> <h:column>
<f:facet name="header">
<h:outputText value="Name" />
</f:facet>
<h:outputText value="#{c.name}"></h:outputText>
</h:column> <h:column>
<f:facet name="header">
<h:outputText value="Address" />
</f:facet> <h:outputText value="#{c.address}"></h:outputText>
</h:column> <h:column>
<f:facet name="header">
<h:outputText value="Created Date" />
</f:facet> <h:outputText value="#{c.createdDate}"></h:outputText>
</h:column> </h:dataTable>
</h:form>
<h2>Add New Customer</h2>
<h:form> <h:panelGrid columns="3"> Name :
<h:inputText id="name" value="#{customer.name}" size="20"
required="true" label="Name">
</h:inputText> <h:message for="name" style="color:red" /> Address :
<h:inputTextarea id="address" value="#{customer.address}" cols="30"
rows="10" required="true" label="Address">
</h:inputTextarea> <h:message for="address" style="color:red" /> </h:panelGrid> <h:commandButton value="Submit" action="#{customer.addCustomer()}" /> </h:form>
</body>
</f:view>
</html>
solutions:
1.project-->right click->properties->project Facets->add JavaServer Faces.
then refresh and rebuild project again and again until the errors disappear.
or
2.changed your jsp page to xhtml,then modified the page taglib using the below snap:
<!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"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets">
done;
最新文章
- Asp.NET MVC 使用 SignalR 实现推送功能二(Hubs 在线聊天室 获取保存用户信息)
- 基于Quartz.NET构建自己的动态作业调度器
- 【腾讯Bugly干货分享】iOS黑客技术大揭秘
- web页面实现指定区域打印功能
- Spring整合Tiles
- matlab 小波变换
- Linux系统调优1
- HDU 1232:流问题(并检查集合)
- MySQL安装--ubuntu
- windows 2008 R2 断电重启进入修复模式
- idea为tomcat设置虚拟地址
- [福大软工] Z班 第7次成绩排行榜
- usb鼠标制作调试记录
- 将Windows下的InfluxDB、Grafana做成Windows服务
- 【Python48--魔法方法:迭代器&;生成器】
- 用vs2015 编译 web app ionic
- Vue.Js加入bootstrap及jquery,或加入其他插件vue-resource,vuex等
- DU 4609 3-idiots FFT
- MongoDB基础入门视频教程
- Ubuntu下环境变量该写进哪个文件里