0 Replies Latest reply on Dec 14, 2007 12:32 AM by wciesiel

    JSF/Faclets/JSPX problem

      Hi all,

      I am trying to build a JSF/Facelets web-app using JSPX as format for page components. The problem is that when I try to deploy it on JBoss (in fact it's jboss-portal 2.6.2 but I am not deploying it as a portlet) the rendered page contains several

      <?xml version="1.0" encoding="UTF-8" ?>
      parts... In fact - each component I am adding (using facelet ui:define, ui:include WORKS properly) has it's ?xml header rendered into final response which breaks presentation in both IE and Firefox. It does NOT happen when I deploy my app onto Tomcat 5.5...

      For example my layout.jspx looks like this:

      <?xml version="1.0" encoding="UTF-8" ?>
      <jsp:root
       xmlns:jsp="http://java.sun.com/JSP/Page"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:krk="http://krakus-opakowania/www"
       xmlns:f="http://java.sun.com/jsf/core" version="1.0">
       <ui:composition>
       <krk:doctype />
       <html xmlns="http://www.w3.org/1999/xhtml">
       <head>
       <meta http-equiv="Content-Type"
       content="text/html; charset=utf-8" />
       </head>
       <body>
       <div id="pageContents"><ui:insert name="mainContent">page content goes here</ui:insert>
       ...
       </body>
       </html>
       </ui:composition>
      </jsp:root>


      and there's a page using this layout:

      <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core" version="1.0">
       <ui:composition template="/WEB-INF/layout.jspx">
       <ui:define name="mainContent">
       ...
       </ui:define>
       </ui:composition>
      </jsp:root>


      And causes <?xml ...> in a middle of a page :

      ...
      <div id="pageContents"><?xml version="1.0" encoding="UTF-8" ?>
      <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.0">
      ...
      


      Does anybody has ANY idea what might be going on? It struck me today as I was trying to deploy piece of important work developed on Tomcat to the JBoss :(

      Any help would be GREATLY appreciated.

      Regards,
      Wojtek