Orbeon XForms (nightly build) with struts tiles (1.3.8)

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

Orbeon XForms (nightly build) with struts tiles (1.3.8)

Gerrit Germis-2

Hi all,

 

I’m new to Orbeon and XForms, and have setup a test-environment as described in the documentation (separate deployment). Everything is working like it should, when I request a page with “/xforms-jsp” in the URL, the page is processed by the Orbeon engine and I get the expected form. However, at work, we use sturts (1.3.8) and tiles. I tried adding a “/xforms-jsp/some-app/index.jsp” to my tiles-defs.xml config which looks something like this:

 

  <definition name="main.page" path="/style/common/layouts/mainPage.jsp">

    <put name="title" value=""/>

    <put name="header" value="/style/common/layouts/header.jsp"/>

    <put name="menu" value="main.menu"/>

    <put name="body" value=""/>

    <put name="footer" value="/style/common/layouts/footer.jsp"/>

  </definition>

 

  <definition name="somePage.page" extends="main.page">

    <put name="title" value="somePage.title"/>

    <put name="body" value="/xforms-jsp/some-app/index.jsp"/>

  </definition>

 

And then in my struts-config.xml file I have:

 

  <action path="/somePage" type="my.package.action.SomeApp " name="someAppForm" scope="request">

    <forward name="success" path=”somePage.page"/>

  </action>

 

Then when I go to:  http://my-server/some-context/somePage.do, I get the correct header/footer/menu and body layout, but I get the raw XHTML output from the JSP in the body instead of the interpreted form of the orbeon engine. Do other people here also use orbeon and apache struts and tiles? If so, I would really appreciate hearing about how I can work around this issue.

 

Thanks in advance,

Gerrit



--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Orbeon XForms (nightly build) with struts tiles (1.3.8)

ilango_g
Could you point me to the location where I can find the documentation about setting up test-environment with Struts?

Gerrit Germis-2 wrote
Hi all,

 

I'm new to Orbeon and XForms, and have setup a test-environment as
described in the documentation (separate deployment). .....
 

Thanks in advance,

Gerrit



--
You receive this message as a subscriber of the ops-users@ow2.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
For general help: mailto:sympa@ow2.org?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Orbeon XForms (nightly build) with struts tiles (1.3.8)

Alessandro Vernet
Administrator
In reply to this post by Gerrit Germis-2
Gerrit,

On Nov 6, 2007 3:53 AM, Gerrit Germis <[hidden email]> wrote:
> Then when I go to:  http://my-server/some-context/somePage.do, I get the
> correct header/footer/menu and body layout, but I get the raw XHTML output
> from the JSP in the body instead of the interpreted form of the orbeon
> engine. Do other people here also use orbeon and apache struts and tiles? If
> so, I would really appreciate hearing about how I can work around this
> issue.

I may be asking the obvious, but did you setup the filter in the
web.xml of your Struts/Tiles application? Having the XHTML+XForms sent
to the browser without being processed looks like the symptom of the
filter now being setup.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Orbeon XForms (nightly build) with struts tiles (1.3.8)

Gerrit Germis-2
In reply to this post by Gerrit Germis-2
Hi Alex,

Thanks for taking the time to respond. Much appreciated.

Yes, the filter is configured in the web.xml. Everything is working as
expected when browsing to the app directly:

url: http://my-host/my-context/xforms-jsp/my-app (without tiles)

But when trying to use tiles (to get the generated form into a part of
the screen), I get the raw XHTML. This is probably because the request
URL doesn't contain the 'xforms-jsp' part anymore:

url: http://my-host/my-context/myAction.do (with tiles)

I was hoping that the jsp would still get processed because the tiles
config has the 'xforms-jsp' part in it:

<definition name="somePage.page" extends="main.page">
    <put name="title" value="somePage.title"/>
    <put name="body" value="/xforms-jsp/my-app/index.jsp"/>
</definition>

My struts action 'myAction' would use 'somePage.page' as a forward, but
as I said, I get the raw XHTML in the 'body' part of the screen then


Gerrit

 
-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of
Alessandro Vernet
Sent: Wednesday, November 07, 2007 0:39 AM
To: [hidden email]
Subject: Re: [ops-users] Orbeon XForms (nightly build) with struts tiles
(1.3.8)

Gerrit,

On Nov 6, 2007 3:53 AM, Gerrit Germis <[hidden email]>
wrote:
> Then when I go to:  http://my-server/some-context/somePage.do, I get
the
> correct header/footer/menu and body layout, but I get the raw XHTML
output
> from the JSP in the body instead of the interpreted form of the orbeon
> engine. Do other people here also use orbeon and apache struts and
tiles? If
> so, I would really appreciate hearing about how I can work around this
> issue.

I may be asking the obvious, but did you setup the filter in the
web.xml of your Struts/Tiles application? Having the XHTML+XForms sent
to the browser without being processed looks like the symptom of the
filter now being setup.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Orbeon XForms (nightly build) with struts tiles (1.3.8)

Alessandro Vernet
Administrator
Gerrit,

On Nov 6, 2007 4:04 PM, Gerrit Germis <[hidden email]> wrote:

> Yes, the filter is configured in the web.xml. Everything is working as
> expected when browsing to the app directly:
>
> url: http://my-host/my-context/xforms-jsp/my-app (without tiles)
>
> But when trying to use tiles (to get the generated form into a part of
> the screen), I get the raw XHTML. This is probably because the request
> URL doesn't contain the 'xforms-jsp' part anymore:
>
> url: http://my-host/my-context/myAction.do (with tiles)
OK, I see. One way to get around this is to change the
<url-pattern>/xforms-jsp/*</url-pattern> in the filter configuration.
You could even make that /*, so everything would get through the
filter. Of course, ideally you should avoid having the filter process
pages that are not using XForms, as this will use CPU cycles for
nothing, and of course the filter might also choke on page that are
not XHTML.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.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
OW2 mailing lists service home page: http://www.ow2.org/wws