about <h:head>

UI Components for JSF
garrodan99
Posts: 6
Joined: 01 Aug 2010, 18:44

01 Aug 2010, 18:53

When I use <p:dataTable>, it require the <h:head> tag
but when I add this tag, the Myclipse IDE say " Unknown element (head) "
and at runtime occur this Error

Code: Select all

sourceId=null[severity=(ERROR 2), summary=(One or more resources have the target of 'head', but no 'head' component has been defined within the view.), detail=(One or more resources have the target of 'head', but no 'head' component has been defined within the view.)]
sourceId=null[severity=(ERROR 2), summary=(One or more resources have the target of 'head', but no 'head' component has been defined within the view.), detail=(One or more resources have the target of 'head', but no 'head' component has been defined within the view.)]
I am using mojarra-2.0.2-FCS-binary.zip , Myclpise 8.5

Code: Select all

<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" xml:lang="en" lang="en"
	xmlns:p="http://primefaces.prime.com.tr/ui"
	>
	<h:head>
		<!--<link rel="stylesheet" type="text/css" href="styles.css">-->
		<title>Edit Auth Page</title>
	</h:head>

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

01 Aug 2010, 20:22

Hi,

Are you using JSP with JSF 2.0, it's not supported to use JSP with PrimeFaces and JSF 2.0.

If that is the case you need to migrate your application to Facelets which is the default view technology of JSF 2.0.

If you use jsp, you can't use many JSF 2.0 features anyway, they are exclusive to Facelets.

garrodan99
Posts: 6
Joined: 01 Aug 2010, 18:44

01 Aug 2010, 20:39

hi, I am using xhtml

Image

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

01 Aug 2010, 20:48

Ok it is just eclipse that doesn't have JSF 2.0 support. Do you have a working JSF 2.0 project, please make sure your app is running fine and then we can help with PrimeFaces setup issues. Can you also post what jars do you have in app's classpath?

garrodan99
Posts: 6
Joined: 01 Aug 2010, 18:44

01 Aug 2010, 21:02

jars :
Image

web.xml

Code: Select all

  
...
  <servlet>  
    <servlet-name>Resource Servlet</servlet-name>  
    <servlet-class>  
        org.primefaces.resource.ResourceServlet  
    </servlet-class>  
  </servlet>  
    
  <servlet-mapping>  
    <servlet-name>Resource Servlet</servlet-name>  
    <url-pattern>/primefaces_resource/*</url-pattern>  
  </servlet-mapping>  
...
Runtime Error:

Code: Select all

sourceId=null[severity=(ERROR 2), summary=(One or more resources have the target of 'head', but no 'head' component has been defined within the view.), detail=(One or more resources have the target of 'head', but no 'head' component has been defined within the view.)]
sourceId=null[severity=(ERROR 2), summary=(One or more resources have the target of 'head', but no 'head' component has been defined within the view.), detail=(One or more resources have the target of 'head', but no 'head' component has been defined within the view.)]

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

01 Aug 2010, 22:45

Hmmm, still can't figure out what's wrong, can you post your full web.xml and faces-config.xml?

garrodan99
Posts: 6
Joined: 01 Aug 2010, 18:44

02 Aug 2010, 09:07

I give you my project folder

If you have MyEclipse8.5, import this project
http://ifile.it/lptmeib/Trip.rar

If you use eclipse, please import this project
http://ifile.it/40o8kue/Trip.rar

after deploy it, enter "http://localhost:8080/Trip/user/register.xtml", and then prees the commandLink at the left menu, u will see the error.
thank you :D

garrodan99
Posts: 6
Joined: 01 Aug 2010, 18:44

03 Aug 2010, 01:50

hello :)

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

03 Aug 2010, 11:22

Had no time to look at your problem.

garrodan99
Posts: 6
Joined: 01 Aug 2010, 18:44

03 Aug 2010, 14:28

forget it :oops:

Locked

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 31 guests