You're sure that you are using facelets?! The problem seems to be in the header, as you are using the jsf-way of declaring taglibs. The jsp-way is not valid xhtml, so you will have to change the header to something like:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <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" xmlns:t="http://myfaces.apache.org/tomahawk"> which adds the namespaces for the taglibs you're using. Be aware, that you cannot simply use jsf-taglibs within facelets: For the most prominent taglibs there are already ports, but you will have to enable them (e.g for Tomahawk: http://wiki.apache.org/myfaces/Use_Facelets_with_Tomahawk) I hope this helps you to get started&I understood your question correctly... Cheers stf 2007/3/21, James Gardener <[EMAIL PROTECTED]>:
Hi all, I am trying to use the facelets. Basically my layout.xhtml contains header, menu, body and footer. I found something wired regarding the menu.xhtml. It works if I only use the plain old html, such as: < div> < div class="lt_navigation" > < div class="nav_header"> Courses and Services</div> < ul> <li><a href ="http://www.arc-mind.com/courses/schedule.html"> Course Schedule</a></li > <li><a href ="http://www.arc-mind.com/consulting/index.html"> Consulting</ a></li> <li><a href ="http://www.arc-mind.com/downloads/index.html"> Tutorials & Downloads</a></ li> <li><a href ="http://www.arc-mind.com/publications/index.html"> Books</a ></li > <li><a href ="http://www.arc-mind.com/newsletter/index.html"> Newsletter Signup</a></li > <li><a href ="http://www.arc-mind.com/news/index.html"> News</a></li> </ ul> </ div></div></div> It does not work if I use jsf tags as below. and I got "The markup in the document preceding the root element must be well-formed" error. < %@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> < %@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%> < %@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%> <f:loadBundle basename="test.messages " var="example_messages" /> <h:form> <t:panelNavigation2 id="nav1" layout="list" itemClass= "mypage" activeItemClass="selected" openItemClass ="selected" > <t:commandNavigation2 value="#{example_messages['user_admin']}" > <t:commandNavigation2 action="adduser" actionListener="#{ navigationMenu.actionListener}"> <f:verbatim>› </f:verbatim> <t:outputText value="Add User" /> </t:commandNavigation2> <t:commandNavigation2 action="edituser" actionListener="#{ navigationMenu.actionListener}" > <f:verbatim>› </f:verbatim> <t:outputText value="Edit User" /> </t:commandNavigation2> <t:commandNavigation2 action="viewuser" actionListener="#{ navigationMenu.actionListener}" > <f:verbatim>› </f:verbatim> <t:outputText value="View User" /> </t:commandNavigation2> </t:commandNavigation2> <t:commandNavigation2 value="#{example_messages['role_admin']}" > <t:commandNavigation2 action="addrole" actionListener="#{ navigationMenu.actionListener}"> <f:verbatim>› </f:verbatim> <t:outputText value="Add Role" /> </t:commandNavigation2> <t:commandNavigation2 action="editrole" actionListener="#{ navigationMenu.actionListener}" > <f:verbatim>› </f:verbatim> <t:outputText value="Edit Role" /> </t:commandNavigation2> <t:commandNavigation2 action="viewrole" actionListener="#{ navigationMenu.actionListener}" > <f:verbatim>› </f:verbatim> <t:outputText value="View Role" /> </t:commandNavigation2> </t:commandNavigation2> </t:panelNavigation2> </h:form> Do you know why? Thanks, James