Page 1 of 2

about <h:head>

Posted: 01 Aug 2010, 18:53
by garrodan99
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>

Re: about <h:head>

Posted: 01 Aug 2010, 20:22
by cagatay.civici
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.

Re: about <h:head>

Posted: 01 Aug 2010, 20:39
by garrodan99
hi, I am using xhtml

Image

Re: about <h:head>

Posted: 01 Aug 2010, 20:48
by cagatay.civici
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?

Re: about <h:head>

Posted: 01 Aug 2010, 21:02
by garrodan99
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.)]

Re: about <h:head>

Posted: 01 Aug 2010, 22:45
by cagatay.civici
Hmmm, still can't figure out what's wrong, can you post your full web.xml and faces-config.xml?

Re: about <h:head>

Posted: 02 Aug 2010, 09:07
by garrodan99
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

Re: about <h:head>

Posted: 03 Aug 2010, 01:50
by garrodan99
hello :)

Re: about <h:head>

Posted: 03 Aug 2010, 11:22
by cagatay.civici
Had no time to look at your problem.

Re: about <h:head>

Posted: 03 Aug 2010, 14:28
by garrodan99
forget it :oops: