myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wolf Benz" <euroj...@gmail.com>
Subject Re: MF1.2.0 + Facelets "XML Parsing Error"
Date Wed, 01 Aug 2007 14:15:56 GMT
Hi Werner,
Bruno solved my problem yesterday:
- I had a PageNotFound.jsp page but as you see, forgot to call it
*.xhtml. (inherited extension of last project...)
- The path in my faces-config was /resources/pages instead of
/WEB-INF/resources/pages
These 2 combined give: the loginPage gave a PageNotFound error, but
the PageNotFound page wasn't rendered ...

So: I adapted that path, renamed the page's extension and I was set to go.
I'm learning... :-)

-Wolf

On 8/1/07, Werner Punz <werner.punz@gmail.com> wrote:
> Hi wolf, just asking conincidentally did you call the page with xhtml
> extension, if yes, call it with the jsf extension, otherwise you wont
> trigger jsf or the facelets.
>
> Cheers
>
> Werner
>
>
> Wolf Benz schrieb:
> > Hi Bruno,
> > No, it's not, I just stripped a little too much in teh copy-paste to mail. :-)
> > This is the entire page:
> >
> > <?xml         version="1.0" encoding="UTF-8" standalone="yes" ?>
> > <!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:f= "http://java.sun.com/jsf/core"
> >       xmlns:h="http://java.sun.com/jsf/html"
> >       xmlns:ui="http://java.sun.com/jsf/facelets"
> >       xmlns:t="http://myfaces.apache.org/tomahawk" >
> >
> >           <ui:remove>Btw this declares html as the default namespace</ui:remove>
> >
> >       <body>
> >       Text outside the ui-composition tags will not be displayed.
> >       <ui:composition template="template.xhtml">
> >               Text in between de ui:composite en ui:define tags will not be
> > displayed either.
> >               <ui:remove>This is the way to edit comments with Facelets.</ui:remove>
> >               <ui:define name="header">
> >               LoginPage  title
> >               </ui:define>
> >               <ui:define name="body">
> >                       This is clear text: Hello everyone.
> >                       <h1>This is a html tag </h1>
> >               <h:outputText value="This is a string from an outputText" />
> >       </ui:define>
> >       </ui:composition>
> >       </body>
> > </html>
> >
> >
> > On 7/31/07, Bruno Aranda <brunoaranda@gmail.com> wrote:
> >> In the login page, where are you opening the ui:composition tag? Seems
> >> to be missing right?
> >>  Hope this is the problem,
> >>
> >> Cheers,
> >>
> >> Bruno
> >>
> >> On 31/07/07, Wolf Benz <eurojava@gmail.com> wrote:
> >>> Hi everybody,
> >>>
> >>> I get this error(@loginPage.xhtml) after my first page(index.xhtml)
> >>> renders correctly - anyone an idea as to the why?
> >>>
> >>>
> >>> "XML Parsing Error: no element found
> >>>
> >>> Location: http://localhost:8080/MeToMa/index.xhtml
> >>>
> >>> Line Number 1, Column 1:"
> >>> (in FF; in other browsers I get just a blank page)
> >>>
> >>> My setup:
> >>>
> >>> template.xhtml:
> >>>
> >>> ...
> >>>
> >>> <body>
> >>>        <f:view>
> >>>           <h:form>
> >>>                <ui:insert name="header">Default Header</ui:insert>
> >>>                <ui:insert name="navigation">Default navigation</ui:insert>
> >>>                <ui:insert name="body">Default Body</ui:insert>
> >>>                <ui:insert name="messages">Default Messages</ui:insert>
> >>>                <ui:insert name="footer">Default Footer</ui:insert>
> >>>       </h:form>
> >>>        </f:view>
> >>> </body>
> >>> </html>
> >>>
> >>>
> >>> index.xhtml (rendering OK)
> >>>
> >>>        <body>
> >>>        <ui:composition template="/WEB-INF/resources/pages/template.xhtml">
> >>>        <ui:define name="navigation">
> >>>        <ui:include src="/WEB-INF/resources/pages/menu.xhtml"/>
> >>>        </ui:define>
> >>>        </ui:composition>
> >>>        </body>
> >>>
> >>>
> >>> with menu.xhtml (rendering OK)
> >>>
> >>>  <ui:composition>
> >>>        <h3>UC Picker</h3>
> >>>        <hr/>
> >>>        <h:panelGrid columns="1">
> >>>           <h:commandLink value="Home" action="loginPage" />
> >>>           <h:commandLink value="Page1" action="page1" />
> >>>           <h:commandLink value="page2" action="page2" />
> >>>        </h:panelGrid>
> >>>    </ui:composition>
> >>>
> >>>
> >>> and loginPage(giving me the error)
> >>>
> >>> ...
> >>>
> >>>        <body>
> >>>                <ui:define name="header">
> >>>                LoginPage  title
> >>>                </ui:define>
> >>>                <ui:define name="body">
> >>>                        This is clear text: Hello everyone.
> >>>                        <h1>This is a html tag </h1>
> >>>                <h:outputText value="This is a string from an outputText"
/>
> >>>        </ui:define>
> >>>        </ui:composition>
> >>>        </body>
> >>> </html>
> >>>
> >
>
>

Mime
View raw message