• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

templates

 
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi I am trying to use templates. My app use JSF 2.0 and primefaces.

I have debugged it and it works well, until it reaches the the template; the code is below and the error is:

javax.faces.view.facelets.FaceletException: Error Parsing /welcome1.xhtml: Error Traced[line: 3] The processing instruction target matching "[xX][mM][lL]" is not allowed.
at com.sun.faces.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:387)
at com.sun.faces.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:361)

-----------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>

<!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:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html">

<ui:composition template="/WEB-INF/facelets/template/defaultLayout.xhtml">

<ui:define name="title">



</ui:define>

<ui:define name="content">

<h:form>
<!-- contenido de la página-->


</h:form>


</ui:define>

</ui:composition>


</html>

¿Any clue?

Thanks
 
Saloon Keeper
Posts: 26290
186
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The very first item on the very first line of your XML file must start with "<?xml " in column 1. If anything preceeds that, the XML parser/validator will object.

If you'll notice, your error message is complaining about finding it on line 3.
reply
    Bookmark Topic Watch Topic
  • New Topic