Primefaces is undefined

UI Components for JSF
Post Reply
danielholloway
Posts: 15
Joined: 23 Jul 2010, 01:26

23 Jul 2010, 14:59

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.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

23 Jul 2010, 15:00

Hi, can you post your page please?

danielholloway
Posts: 15
Joined: 23 Jul 2010, 01:26

23 Jul 2010, 15:12

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>

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

23 Jul 2010, 15:15

You just need h:head instead of head.

danielholloway
Posts: 15
Joined: 23 Jul 2010, 01:26

23 Jul 2010, 15:20

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.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

23 Jul 2010, 15:24

What does happen when you place h:head, what is the error?

danielholloway
Posts: 15
Joined: 23 Jul 2010, 01:26

23 Jul 2010, 15:29

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"

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

23 Jul 2010, 15:36

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

danielholloway
Posts: 15
Joined: 23 Jul 2010, 01:26

23 Jul 2010, 17:25

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.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

23 Jul 2010, 17:45

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.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 12 guests