I am getting web-page errors "Primefaces is undefined". Also, I am using jsp. Everything works fine with primefaces 2.0, but when I tried to use the newly released 2.1 everything stopped working. My guess is p:resources does not work any longer or because h:head and h:body is not included in the jsf taglib for jsp.
Is there a way for jsp to see primefaces 2.1? I plan on using xhtml in the future but would like to get this working for now.
Primefaces is undefined
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Hi, can you post your page please?
-
- Posts: 15
- Joined: 23 Jul 2010, 01:26
To keep it simple. I cannot even get tabview to work in this simple page.
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib prefix="p" uri="http://primefaces.prime.com.tr/ui"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<f:view>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body>
<p:tabView>
<p:tab title="Reports">
</p:tab>
</p:tabView>
</body>
</html>
</f:view>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib prefix="p" uri="http://primefaces.prime.com.tr/ui"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<f:view>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body>
<p:tabView>
<p:tab title="Reports">
</p:tab>
</p:tabView>
</body>
</html>
</f:view>
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
You just need h:head instead of head.
-
- Posts: 15
- Joined: 23 Jul 2010, 01:26
I do not have h:head or h:body to pick from. Am I using the wrong version of jsf. I am using mojarra 2.0.3.
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
What does happen when you place h:head, what is the error?
-
- Posts: 15
- Joined: 23 Jul 2010, 01:26
I am using Tomcat 6.0 and here is the error.
org.apache.jasper.JasperException: /test.jsp(17,8) No tag "head" defined in tag library imported with prefix "h"
org.apache.jasper.JasperException: /test.jsp(17,8) No tag "head" defined in tag library imported with prefix "h"
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
I thought h:head was available in jsp as well, then I think you can't upgrade unless you create your own custom component that does;
http://code.google.com/p/primefaces/sou ... derer.java
http://code.google.com/p/primefaces/sou ... derer.java
-
- Posts: 15
- Joined: 23 Jul 2010, 01:26
So what you are saying is the only way to user jsp which primefaces 2.1 is to modify the HeadRender.java which you provided.
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
No, I meant creating your own component like c:resources that does what HeadRenderer does as clearly this is a JSP limitation with JSF 2.0. Maybe it is a better idea to take some time and migrate to JSF2 as with JSP-JSF you also can't use other JSF2 features.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 12 guests