1 Reply Latest reply on Aug 2, 2007 5:54 AM by Pete Muir

    Malformed xhtml doc w/ Facelets in Seam 2.0.0.Beta1?

    Clark Updike Newbie

      This is from a seam-gen'd app running on JBoss AS 4.2. The log is showing:

      12:01:36,031 ERROR [STDERR] Jul 31, 2007 12:01:36 PM com.sun.facelets.FaceletViewHandler handleRenderException
      SEVERE: Error Rendering View[/PpAdhocItemList.xhtml]
      java.lang.RuntimeException: org.dom4j.DocumentException: Error on line 1 of document : Content is not allowed in prolog. Nested exception: Content is not allowed in prolog.
       at org.jboss.seam.navigation.Pages.getDocumentRoot(Pages.java:943)
       ...

      FWICT, this happens when there is content before the "prolog" line identifying the doc type. The facelets error page shows the following tree:
      <AjaxViewRoot id="_viewRoot" immediate="false" locale="en" renderKitId="HTML_BASIC" renderRegionOnly="false" rendered="true" selfRendered="false" submitted="false" transient="false" viewId="/PpAdhocItemList.xhtml">
      
       <!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"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <title>AutoPropPass3</title> <link href="stylesheet/theme.css" rel="stylesheet" type="text/css"/> </head> <body>
      
       <HtmlToolBar id="j_id2" itemSeparator="none" rendered="true" transient="false" width="100%">
      ...

      What the heck is causing the AjaxViewRoot tag to go in there before the prolog line? I haven't put any AjaxViewRoot tags in the code myself.

      Thanks, Clark