Integrated deployment of JSP and Xforms

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

Integrated deployment of JSP and Xforms

henry821
Hello, Alex,
Under Orbeon 3.9, we used the integrated deployment of JSP and Xforms for a custom application.  Under Orbeon 4.10, the jsp seems to be only partially working.  It seems integrated deployment was deprecated in 4.5 according to http://wiki.orbeon.com/forms/doc/developer-guide/xforms-with-java-applications .  Does this mean that it just will not work anymore, and you have to move to a seperate deployment?  If so, why are there still xforms-jsp examples in Orbeon 4.10? Thank you~


Henry
Reply | Threaded
Open this post in threaded view
|

Re: Integrated deployment of JSP and Xforms

Alessandro  Vernet
Administrator
Hi Henry,

Integrated deployment should still work. We deprecated it as we think separate deployment is a superior alternative, and prefer not to spend cycles supporting, testing, and documenting the integrated deployment going forward.

However, if you have something that is working with integrated deployment, I would imagine it could still work with 4.10. What is the issue you're seeing? Is this something we would be able to reproduce?

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Integrated deployment of JSP and Xforms

henry821
Hi, Alex,
 
The problem we are seeing is that no instances are loading when we access form=RM-999-FM-01. Attachment below are index.jspindex.jspunder set-viewer folder and model.xhtmlview.xhtmlunder RM-999-FM-01 folder.

Reply | Threaded
Open this post in threaded view
|

Re: Integrated deployment of JSP and Xforms

Alessandro  Vernet
Administrator
Henry,

I am seeing that the index.jsp is loading many more files that I don't have. Would you be able to simplify the test case so it doesn't require or include all those files?

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Integrated deployment of JSP and Xforms

Bob Blanchard
Hi Alex,

I've simplified Henry's test case for you here (I work with Henry). Part
of the problem is related to namespaces, and another part is related to
nested includes.

The following works in 3.9:

/xforms-jsp/custom/index.jsp:

<xh:html
     xmlns:xi="http://www.w3.org/2001/XInclude"
     xmlns:xxi="http://orbeon.org/oxf/xml/xinclude"
     xmlns:xf="http://www.w3.org/2002/xforms"
     xmlns:xxf="http://orbeon.org/oxf/xml/xforms"
     xmlns:fr="http://orbeon.org/oxf/xml/form-runner"
     xmlns:xh="http://www.w3.org/1999/xhtml"
     xmlns:xs="http://www.w3.org/2001/XMLSchema">

     <xh:head>
         <xh:title>Nested includes</xh:title>
         <xf:model>
             <xi:include href="oxf:///apps/model.xhtml"
xxi:omit-xml-base="true" />
         </xf:model>
     </xh:head>
     <xh:body>
         <xh:div class="container">
             <xh:h1>Nested includes example</xh:h1>
         </xh:div>
    <fr:xforms-inspector/>
     </xh:body>
</xh:html>

/apps/model.xhtml:

<include
     xmlns:xi="http://www.w3.org/2001/XInclude"
     xmlns:xxi="http://orbeon.org/oxf/xml/xinclude"
     xmlns:xf="http://www.w3.org/2002/xforms"
     xmlns:xxf="http://orbeon.org/oxf/xml/xforms"
     xmlns:fr="http://orbeon.org/oxf/xml/form-runner"
     xmlns:xh="http://www.w3.org/1999/xhtml"
     xmlns:xs="http://www.w3.org/2001/XMLSchema">

         <xf:instance id="some-id">
                 <data/>
         </xf:instance>

         <xi:include href="/apps/model2.xhtml"/>
</include>

/apps/model2.xhtml
<include
     xmlns:xi="http://www.w3.org/2001/XInclude"
     xmlns:xxi="http://orbeon.org/oxf/xml/xinclude"
     xmlns:xf="http://www.w3.org/2002/xforms"
     xmlns:xxf="http://orbeon.org/oxf/xml/xforms"
     xmlns:fr="http://orbeon.org/oxf/xml/form-runner"
     xmlns:xh="http://www.w3.org/1999/xhtml"
     xmlns:xs="http://www.w3.org/2001/XMLSchema">

         <xf:instance id="some-id2">
                 <data/>
         </xf:instance>

</include>

When I say "works", I mean you can navigate to
"http://...:8080/orbeon3.9/xforms-jsp/custom/" and via the xforms
inspector, you see both instances ("some-id" and "some-id2" from each of
the included files).

Under 4.10, the includes won't load.  If we try the trick of the
xpointer="xpath(/*/*)" on the xi:include, then we get an Orbeon error
page.  I've tracked this down the nested include... "/apps/model2.xhtml"
is not found.

2015-11-19 13:32:59,447 ERROR PageFlowControllerProcessor  - error
caught {controller: "oxf:/ops/xforms/xforms-renderer-page-flow.xml",
method: "GET", path: "/xforms-renderer"}
2015-11-19 13:32:59,475 ERROR PageFlowControllerProcessor  -
+----------------------------------------------------------------------------------------------------------------------+
|An Error has Occurred |
|----------------------------------------------------------------------------------------------------------------------|
|/apps/model2.xhtml (No such file or directory) |
|----------------------------------------------------------------------------------------------------------------------|
|Application Call Stack |
|----------------------------------------------------------------------------------------------------------------------|
|file:/apps/model2.xhtml |                              |    |
|oxf:/ops/xforms/xforms-renderer-page-flow.xml |reading page model data
output|  23|
|······················································································································|
|element=<page path="/xforms-renderer" model="xforms-renderer.xpl"/> |
|model =xforms-renderer.xpl |
|----------------------------------------------------------------------------------------------------------------------|
|oxf:/ops/xforms/xforms-renderer.xpl |executing processor           | 130|
|······················································································································|
|element=<p:processor name="oxf:pipeline">[...]</p:processor> |
|name   ={http://www.orbeon.com/oxf/processors}pipeline


Thanks for your assistance.

-Bob

On 11/18/2015 06:37 PM, Alessandro Vernet wrote:

> Henry,
>
> I am seeing that the index.jsp is loading many more files that I don't have.
> Would you be able to simplify the test case so it doesn't require or include
> all those files?
>
> Alex
>
> -----
>
>


--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Integrated deployment of JSP and Xforms

Alessandro  Vernet
Administrator
Hi Bob,

Adding xpointer="xpath(/*/*)" on both <xi:include> works for me. Here are the files I have:

https://gist.github.com/avernet/1d3af554fe96f95895e8

You'll let me know if this works for you.

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Integrated deployment of JSP and Xforms

Bob Blanchard
I noticed you added "oxf:" to your href in model.xhtml.

This does indeed work for this example, but will this same technique
work from non-jsp pages as well?  (I have included files shared between
JSP and non-JSP pages).

Thanks!



On 11/20/2015 08:21 PM, Alessandro Vernet wrote:

> Hi Bob,
>
> Adding xpointer="xpath(/*/*)" on both <xi:include> works for me. Here are
> the files I have:
>
> https://gist.github.com/avernet/1d3af554fe96f95895e8
>
> You'll let me know if this works for you.
>
> Alex
>
> -----

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Integrated deployment of JSP and Xforms

Alessandro  Vernet
Administrator
Hi Bob,

Yes, you can also use oxf:/ if you're not in a JSP, and it will work in the same way.

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Integrated deployment of JSP and Xforms

Bob Blanchard
Excellent, thanks Alex!  This should clear up many of our issues.

On 11/23/2015 02:44 PM, Alessandro Vernet wrote:
> Hi Bob,
>
> Yes, you can also use oxf:/ if you're not in a JSP, and it will work in the
> same way.
>
> Alex
>
> -----

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].