0 Replies Latest reply on Jul 30, 2012 10:38 AM by zhijiang chen

    One or more resources have the target of 'head', but no 'head' component has been defined within the view.

    zhijiang chen Newbie

      I having following strange problem with Seam web project, I tried google the answers, but nothing helpful:(.

      22:20:43,199 INFO  [javax.enterprise.resource.webcontainer.jsf.renderkit] (http-localhost- WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.

      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.)]


      This is project generated using JBoss tools (Seams 2.3.0 Beta 2, JSF 2.0, JBoss AS 7.1.1), with latest version of JBoss Developer Studio, Version: 5.0.1.GA, and I didn't change anything.


      here are some code:


      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      <f:view xmlns="http://www.w3.org/1999/xhtml"
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
            <title>ALl About Knowledge</title>
            <link rel="shortcut icon" href="#{request.contextPath}/favicon.ico"/>
            <h:outputStylesheet name="/stylesheet/theme.ecss"/>
            <h:outputStylesheet name="/stylesheet/theme.css"/>
            <ui:insert name="head"/>
            <ui:include src="menu.xhtml">
               <ui:param name="projectName" value="allaboutknowledge"/>
            <div class="body">
               <h:messages id="messages" globalOnly="true" styleClass="message"
                  errorClass="errormsg" infoClass="infomsg" warnClass="warnmsg"
                  rendered="#{showGlobalMessages != 'false'}"/>
               <ui:insert name="body"/>
            <div class="footer">
               <p>Powered by <a href="http://seamframework.org">Seam</a> #{org.jboss.seam.version} and <a href="http://www.jboss.org/richfaces">RichFaces</a>. Generated by seam-gen.</p>
               <s:fragment rendered="#{init.debug}">
               <a:log hotkey="D"/>
               <p style="margin-top: -0.5em;">
                  Conversation: id = #{conversation.id}, #{conversation.longRunning ? 'long running' : 'temporary'}#{conversation.nested ? ', nested, parent id = '.concat(conversation.parentId) : ''}
                  #{' - '}
                  Ajax4jsf Log (Ctrl+Shift+D)
                  #{' - '}
                  <s:link id="debugConsole" view="/debug.xhtml" value="Debug console" target="debugConsole"/>
                  #{' - '}
                  <s:link id="resetSession" view="/home.xhtml" action="#{org.jboss.seam.web.session.invalidate}" propagation="none" value="Terminate session"/>



      <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
          <ui:define name="head">
          <ui:define name="body">
              <h1>Welcome to Seam!</h1>
                  <h:panelGrid columns="2">
                      <h:graphicImage value="/img/seamlogo.png" alt="Seam logo"/>
                      <s:div styleClass="info">
                          <p><strong>Your seam-gen project is deployed!</strong> Here are some of the features this project provides:</p>
                          <ul class="bullets">
                              <li>Ant build script</li>
                              <li>Deployment to JBoss AS (EAR or WAR)</li>
                              <li>Development and production profiles</li>
                              <li>Integration testing using TestNG and Embedded JBoss</li>
                              <li>JavaBean or EJB 3.0 Seam components</li>
                              <li>JPA entity classes</li>
                              <li>A configurable DataSource and JPA EntityManager</li>
                              <li>Templated Facelets views</li>
                              <li>RichFaces panels and tables</li>
                              <li>Default CSS stylesheet</li>
                              <li>Internationalization support</li>



      Anyone please help, I have been struck here for a week. .


      Thanks very much.