How to add a simple page within OPS?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to add a simple page within OPS?

Florent Georges
  Hi

  I guess this problem is quite obvious, but I can't figure
what I did wrong (after reading the tutorial and the page
"reference-page-flow").

  I tried to add an hello-world example to my freshly
installed OPS.  I use Tomcat.  I can access OPS via
http://localhost:8080/ops/, and see the examples.  I add the
following element to ops/WEB-INF/resources/page-flow.xpl:

    <page path-info="/drkm/.+"
          matcher="oxf:perl5-matcher"
          model="/drkm/page-flow.xpl"/>

just below the 'files' elements and as the first 'page'
element.  Then I created the file drkm/page-flow.xpl:

    <config xmlns="http://www.orbeon.com/oxf/controller">
      <page path-info="/drkm/hello1" view="hello1/view.xhtml"/>
    </config>

and the file drkm/hello1/view.xhtml:

    <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
        <title>Hello!</title>
      </head>
      <body>
        <p>Hello, world!</p>
      </body>
    </html>

(both in ops/WEB-INF/resources/).  But when I point my
browser to http://localhost:8080/ops/drkm/hello1, I get
nothing (the page remains blank, as well as the result of
the "view source").

  Can you see the mistake?  Did I forgot something?

  Thanks in advance.  Regards,

--drkm




























       

       
               
___________________________________________________________________________
Découvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet !
Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos expériences.
http://fr.answers.yahoo.com 




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: How to add a simple page within OPS?

Erik Bruchez
Administrator
Florent,

 > I guess this problem is quite obvious, but I can't figure what I did
 > wrong (after reading the tutorial and the page
 > "reference-page-flow").
 >
 > I tried to add an hello-world example to my freshly installed OPS.
 > I use Tomcat.  I can access OPS via http://localhost:8080/ops/, and
 > see the examples.  I add the following element to
 > ops/WEB-INF/resources/page-flow.xpl:
 >
 >     <page path-info="/drkm/.+"
 >           matcher="oxf:perl5-matcher"
 >           model="/drkm/page-flow.xpl"/>
 >
 > just below the 'files' elements and as the first 'page'
 > element.  Then I created the file drkm/page-flow.xpl:
 >
 >     <config xmlns="http://www.orbeon.com/oxf/controller">
 >       <page path-info="/drkm/hello1" view="hello1/view.xhtml"/>
 >     </config>

First, although extensions do not matter in OPS, an XPL file should
contain, well, XPL, that is an XML pipeline. Here you are putting Page
Flow Controller definitions.

So write the following in drkm/page-flow.xpl:

   <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
             xmlns:oxf="http://www.orbeon.com/oxf/processors">

       <p:processor name="oxf:page-flow">
           <p:input name="controller" href="page-flow.xml"/>
       </p:processor>

   </p:config>

Then also write drkm/page-flow.xml:

   <config xmlns="http://www.orbeon.com/oxf/controller">
       <page path-info="/drkm/hello1" view="hello1/view.xhtml"/>
   </config>

This should work.

Recent builds of OPS of the PFC is now able to load a sub-PFC as a
model, so you can write directly:

      <page path-info="/drkm/.+"
            matcher="oxf:perl5-matcher"
            model="/drkm/page-flow.xml"/>

But I suspect you are using an older build where this is not
supported.

-Erik

--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws