在primefaces论坛中有some comments Primefaces 2.x及以上版本无法与JSP一起使用。改用Facelets。
使用primefaces一个的facelet页看起来是这样的:
<?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:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.prime.com.tr/ui">
<h:head>
... put your header info here
</h:ead>
<h:body>
.. put your content here
</h:body>
</html>
还有更多的事情要注意,如果你想从JSP切换到小面。我认为你开始阅读some tutorials或这related question and answers。
taglib描述符看起来不错。你把jar文件放在哪里? – 2011-04-13 07:24:54
我在Build Path中添加了jar文件作为外部存档,我还通过在web-inf下的lib文件夹下添加了jar文件 – diyasher 2011-04-13 07:30:22
**欢迎使用StackOverflow!**请格式化每行代码**四个空格**。谢谢! – 2011-05-17 17:51:44