resolving relative urls in separate java deployment

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

resolving relative urls in separate java deployment

Bryn Davies-3

Hi – I have followed the instructions for separate java deployment and have orbeon deployed under path /orbeon and my app deployed in the same tomcat server under path /ivs. Within my app, I have the orbeon xforms filter configured thus:

 

                <filter-mapping>

                                <filter-name>orbeon-xforms-filter</filter-name>

                                <url-pattern>/protected/xforms/*</url-pattern>

                                <dispatcher>REQUEST</dispatcher>

                                <dispatcher>FORWARD</dispatcher>

                </filter-mapping>

                <filter-mapping>

                                <filter-name>orbeon-xforms-filter</filter-name>

                                <url-pattern>/orbeon/*</url-pattern>

                                <dispatcher>REQUEST</dispatcher>

                                <dispatcher>FORWARD</dispatcher>

                </filter-mapping>

 

So my app has struts actions under the url /ivs/protected/xforms/xxx.action which produce my xforms output, and this is getting correctly processed by orbeon, so all well and good.

 

My problem is that I am having difficulty correctly specifying my xforms:submission elements to point to actions within the ivs application using relative urls. For example, I have a save-portfolio action with the url ivs/protected/savePortfolio.action. If I specify a submission element as:

 

<xforms:submission id="save-submission" ref="instance('portfolio-instance')"

                                                                   resource="/protected/savePortfolio.action" method="post" replace="none">

 

then orbeon resolves this to the url <a href="http://host:port/ivs/orbeon/protected/savePortfolio.action">http://host:port/ivs/orbeon/protected/savePortfolio.action instead of the required <a href="http://host:port/ivs/protected/savePortfolio.action">http://host:port/ivs/protected/savePortfolio.action . I have managed to get the submissions working but only by specifying the full address explicitly. However doing this causes an unnecessary round trip to the proxy which I assume could be avoided by using relative urls – if I can get them working.

 

Any advice on where I am going wrong would be appreciated as I have re-read the documentation several times and can’t see which piece I have misunderstood.

 

Bryn Davies



--
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: resolving relative urls in separate java deployment

Andrew Bailey
Bryn,

You could try

<xf:submission  .... f:url-norewrite="true"

where the namespace is
xmlns:f="http://orbeon.org/oxf/xml/formatting"

so that orbeon doesnt rewrite the urls

Hope it solves your problem

Andy Bailey

http://www.hazlorealidad.com

On Fri, Sep 25, 2009 at 6:17 AM, Bryn Davies
<[hidden email]> wrote:

> Hi – I have followed the instructions for separate java deployment and have
> orbeon deployed under path /orbeon and my app deployed in the same tomcat
> server under path /ivs. Within my app, I have the orbeon xforms filter
> configured thus:
>
>
>
>                 <filter-mapping>
>
>
> <filter-name>orbeon-xforms-filter</filter-name>
>
>
> <url-pattern>/protected/xforms/*</url-pattern>
>
>                                 <dispatcher>REQUEST</dispatcher>
>
>                                 <dispatcher>FORWARD</dispatcher>
>
>                 </filter-mapping>
>
>                 <filter-mapping>
>
>
> <filter-name>orbeon-xforms-filter</filter-name>
>
>                                 <url-pattern>/orbeon/*</url-pattern>
>
>                                 <dispatcher>REQUEST</dispatcher>
>
>                                 <dispatcher>FORWARD</dispatcher>
>
>                 </filter-mapping>
>
>
>
> So my app has struts actions under the url /ivs/protected/xforms/xxx.action
> which produce my xforms output, and this is getting correctly processed by
> orbeon, so all well and good.
>
>
>
> My problem is that I am having difficulty correctly specifying my
> xforms:submission elements to point to actions within the ivs application
> using relative urls. For example, I have a save-portfolio action with the
> url ivs/protected/savePortfolio.action. If I specify a submission element
> as:
>
>
>
> <xforms:submission id="save-submission" ref="instance('portfolio-instance')"
>
>
> resource="/protected/savePortfolio.action" method="post" replace="none">
>
>
>
> then orbeon resolves this to the url
> <a href="http://host:port/ivs/orbeon/protected/savePortfolio.action">http://host:port/ivs/orbeon/protected/savePortfolio.action instead of the
> required <a href="http://host:port/ivs/protected/savePortfolio.action">http://host:port/ivs/protected/savePortfolio.action . I have
> managed to get the submissions working but only by specifying the full
> address explicitly. However doing this causes an unnecessary round trip to
> the proxy which I assume could be avoided by using relative urls – if I can
> get them working.
>
>
>
> Any advice on where I am going wrong would be appreciated as I have re-read
> the documentation several times and can’t see which piece I have
> misunderstood.
>
>
>
> Bryn Davies


--
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: resolving relative urls in separate java deployment

Erik Bruchez-3
In reply to this post by Bryn Davies-3
Bryn,

This is a known issue and we will be working on fixing this over the
next two weeks!

-Erik

On Fri, Sep 25, 2009 at 4:17 AM, Bryn Davies
<[hidden email]> wrote:

> Hi – I have followed the instructions for separate java deployment and have
> orbeon deployed under path /orbeon and my app deployed in the same tomcat
> server under path /ivs. Within my app, I have the orbeon xforms filter
> configured thus:
>
>
>
>                 <filter-mapping>
>
>
> <filter-name>orbeon-xforms-filter</filter-name>
>
>
> <url-pattern>/protected/xforms/*</url-pattern>
>
>                                 <dispatcher>REQUEST</dispatcher>
>
>                                 <dispatcher>FORWARD</dispatcher>
>
>                 </filter-mapping>
>
>                 <filter-mapping>
>
>
> <filter-name>orbeon-xforms-filter</filter-name>
>
>                                 <url-pattern>/orbeon/*</url-pattern>
>
>                                 <dispatcher>REQUEST</dispatcher>
>
>                                 <dispatcher>FORWARD</dispatcher>
>
>                 </filter-mapping>
>
>
>
> So my app has struts actions under the url /ivs/protected/xforms/xxx.action
> which produce my xforms output, and this is getting correctly processed by
> orbeon, so all well and good.
>
>
>
> My problem is that I am having difficulty correctly specifying my
> xforms:submission elements to point to actions within the ivs application
> using relative urls. For example, I have a save-portfolio action with the
> url ivs/protected/savePortfolio.action. If I specify a submission element
> as:
>
>
>
> <xforms:submission id="save-submission" ref="instance('portfolio-instance')"
>
>
> resource="/protected/savePortfolio.action" method="post" replace="none">
>
>
>
> then orbeon resolves this to the url
> <a href="http://host:port/ivs/orbeon/protected/savePortfolio.action">http://host:port/ivs/orbeon/protected/savePortfolio.action instead of the
> required <a href="http://host:port/ivs/protected/savePortfolio.action">http://host:port/ivs/protected/savePortfolio.action . I have
> managed to get the submissions working but only by specifying the full
> address explicitly. However doing this causes an unnecessary round trip to
> the proxy which I assume could be avoided by using relative urls – if I can
> get them working.
>
>
>
> Any advice on where I am going wrong would be appreciated as I have re-read
> the documentation several times and can’t see which piece I have
> misunderstood.
>
>
>
> Bryn Davies
>
> --
> 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
>
>


--
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: Re: resolving relative urls in separate java deployment

Bryn Davies-3
Nice one, thanks Erik. I haven't had time to test Andrew Bailey's suggestion yet but will confirm whether it worked for me as soon as I do.

Bryn

-----Original Message-----
From: Erik Bruchez [mailto:[hidden email]]
Sent: 29 September 2009 21:52
To: [hidden email]
Subject: [ops-users] Re: resolving relative urls in separate java deployment

Bryn,

This is a known issue and we will be working on fixing this over the next two weeks!

-Erik

On Fri, Sep 25, 2009 at 4:17 AM, Bryn Davies <[hidden email]> wrote:

> Hi - I have followed the instructions for separate java deployment and
> have orbeon deployed under path /orbeon and my app deployed in the
> same tomcat server under path /ivs. Within my app, I have the orbeon
> xforms filter configured thus:
>
>
>
>                 <filter-mapping>
>
>
> <filter-name>orbeon-xforms-filter</filter-name>
>
>
> <url-pattern>/protected/xforms/*</url-pattern>
>
>                                 <dispatcher>REQUEST</dispatcher>
>
>                                 <dispatcher>FORWARD</dispatcher>
>
>                 </filter-mapping>
>
>                 <filter-mapping>
>
>
> <filter-name>orbeon-xforms-filter</filter-name>
>
>                                 <url-pattern>/orbeon/*</url-pattern>
>
>                                 <dispatcher>REQUEST</dispatcher>
>
>                                 <dispatcher>FORWARD</dispatcher>
>
>                 </filter-mapping>
>
>
>
> So my app has struts actions under the url
> /ivs/protected/xforms/xxx.action which produce my xforms output, and
> this is getting correctly processed by orbeon, so all well and good.
>
>
>
> My problem is that I am having difficulty correctly specifying my
> xforms:submission elements to point to actions within the ivs
> application using relative urls. For example, I have a save-portfolio
> action with the url ivs/protected/savePortfolio.action. If I specify a
> submission element
> as:
>
>
>
> <xforms:submission id="save-submission" ref="instance('portfolio-instance')"
>
>
> resource="/protected/savePortfolio.action" method="post"
> replace="none">
>
>
>
> then orbeon resolves this to the url
> <a href="http://host:port/ivs/orbeon/protected/savePortfolio.action">http://host:port/ivs/orbeon/protected/savePortfolio.action instead of
> the required <a href="http://host:port/ivs/protected/savePortfolio.action">http://host:port/ivs/protected/savePortfolio.action . I
> have managed to get the submissions working but only by specifying the
> full address explicitly. However doing this causes an unnecessary
> round trip to the proxy which I assume could be avoided by using
> relative urls - if I can get them working.
>
>
>
> Any advice on where I am going wrong would be appreciated as I have
> re-read the documentation several times and can't see which piece I
> have misunderstood.
>
>
>
> Bryn Davies
>
> --
> 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
>
>


--
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: Re: resolving relative urls in separate java deployment

Bryn Davies-3
In reply to this post by Andrew Bailey
Andy, that did indeed work. Many thanks for your help.

Bryn Davies



-----Original Message-----
From: Andrew Bailey [mailto:[hidden email]]
Sent: 29 September 2009 01:27
To: [hidden email]
Subject: [ops-users] Re: resolving relative urls in separate java deployment

Bryn,

You could try

<xf:submission  .... f:url-norewrite="true"

where the namespace is
xmlns:f="http://orbeon.org/oxf/xml/formatting"

so that orbeon doesnt rewrite the urls

Hope it solves your problem

Andy Bailey

http://www.hazlorealidad.com

On Fri, Sep 25, 2009 at 6:17 AM, Bryn Davies <[hidden email]> wrote:

> Hi - I have followed the instructions for separate java deployment and
> have orbeon deployed under path /orbeon and my app deployed in the
> same tomcat server under path /ivs. Within my app, I have the orbeon
> xforms filter configured thus:
>
>
>
>                 <filter-mapping>
>
>
> <filter-name>orbeon-xforms-filter</filter-name>
>
>
> <url-pattern>/protected/xforms/*</url-pattern>
>
>                                 <dispatcher>REQUEST</dispatcher>
>
>                                 <dispatcher>FORWARD</dispatcher>
>
>                 </filter-mapping>
>
>                 <filter-mapping>
>
>
> <filter-name>orbeon-xforms-filter</filter-name>
>
>                                 <url-pattern>/orbeon/*</url-pattern>
>
>                                 <dispatcher>REQUEST</dispatcher>
>
>                                 <dispatcher>FORWARD</dispatcher>
>
>                 </filter-mapping>
>
>
>
> So my app has struts actions under the url
> /ivs/protected/xforms/xxx.action which produce my xforms output, and
> this is getting correctly processed by orbeon, so all well and good.
>
>
>
> My problem is that I am having difficulty correctly specifying my
> xforms:submission elements to point to actions within the ivs
> application using relative urls. For example, I have a save-portfolio
> action with the url ivs/protected/savePortfolio.action. If I specify a
> submission element
> as:
>
>
>
> <xforms:submission id="save-submission" ref="instance('portfolio-instance')"
>
>
> resource="/protected/savePortfolio.action" method="post"
> replace="none">
>
>
>
> then orbeon resolves this to the url
> <a href="http://host:port/ivs/orbeon/protected/savePortfolio.action">http://host:port/ivs/orbeon/protected/savePortfolio.action instead of
> the required <a href="http://host:port/ivs/protected/savePortfolio.action">http://host:port/ivs/protected/savePortfolio.action . I
> have managed to get the submissions working but only by specifying the
> full address explicitly. However doing this causes an unnecessary
> round trip to the proxy which I assume could be avoided by using
> relative urls - if I can get them working.
>
>
>
> Any advice on where I am going wrong would be appreciated as I have
> re-read the documentation several times and can't see which piece I
> have misunderstood.
>
>
>
> Bryn Davies


--
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: RE: Re: resolving relative urls in separate java deployment

Bryn Davies-3
Actually I spoke too soon - the addition of the f:url-norewrite attribute did solve the problem of using relative urls in the xforms:submission elements, but unfortunately it did not work when attempting to use a relative url to my schema from within the xforms:model definition. Erik, could you confirm that this is covered by the known issue to be fixed shortly?

Thanks

Bryn Davies

-----Original Message-----
From: Bryn Davies [mailto:[hidden email]]
Sent: 30 September 2009 14:40
To: [hidden email]
Subject: [ops-users] RE: Re: resolving relative urls in separate java deployment

Andy, that did indeed work. Many thanks for your help.

Bryn Davies



-----Original Message-----
From: Andrew Bailey [mailto:[hidden email]]
Sent: 29 September 2009 01:27
To: [hidden email]
Subject: [ops-users] Re: resolving relative urls in separate java deployment

Bryn,

You could try

<xf:submission  .... f:url-norewrite="true"

where the namespace is
xmlns:f="http://orbeon.org/oxf/xml/formatting"

so that orbeon doesnt rewrite the urls

Hope it solves your problem

Andy Bailey

http://www.hazlorealidad.com

On Fri, Sep 25, 2009 at 6:17 AM, Bryn Davies <[hidden email]> wrote:

> Hi - I have followed the instructions for separate java deployment and
> have orbeon deployed under path /orbeon and my app deployed in the
> same tomcat server under path /ivs. Within my app, I have the orbeon
> xforms filter configured thus:
>
>
>
>                 <filter-mapping>
>
>
> <filter-name>orbeon-xforms-filter</filter-name>
>
>
> <url-pattern>/protected/xforms/*</url-pattern>
>
>                                 <dispatcher>REQUEST</dispatcher>
>
>                                 <dispatcher>FORWARD</dispatcher>
>
>                 </filter-mapping>
>
>                 <filter-mapping>
>
>
> <filter-name>orbeon-xforms-filter</filter-name>
>
>                                 <url-pattern>/orbeon/*</url-pattern>
>
>                                 <dispatcher>REQUEST</dispatcher>
>
>                                 <dispatcher>FORWARD</dispatcher>
>
>                 </filter-mapping>
>
>
>
> So my app has struts actions under the url
> /ivs/protected/xforms/xxx.action which produce my xforms output, and
> this is getting correctly processed by orbeon, so all well and good.
>
>
>
> My problem is that I am having difficulty correctly specifying my
> xforms:submission elements to point to actions within the ivs
> application using relative urls. For example, I have a save-portfolio
> action with the url ivs/protected/savePortfolio.action. If I specify a
> submission element
> as:
>
>
>
> <xforms:submission id="save-submission" ref="instance('portfolio-instance')"
>
>
> resource="/protected/savePortfolio.action" method="post"
> replace="none">
>
>
>
> then orbeon resolves this to the url
> <a href="http://host:port/ivs/orbeon/protected/savePortfolio.action">http://host:port/ivs/orbeon/protected/savePortfolio.action instead of
> the required <a href="http://host:port/ivs/protected/savePortfolio.action">http://host:port/ivs/protected/savePortfolio.action . I
> have managed to get the submissions working but only by specifying the
> full address explicitly. However doing this causes an unnecessary
> round trip to the proxy which I assume could be avoided by using
> relative urls - if I can get them working.
>
>
>
> Any advice on where I am going wrong would be appreciated as I have
> re-read the documentation several times and can't see which piece I
> have misunderstood.
>
>
>
> Bryn Davies


--
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: RE: RE: Re: resolving relative urls in separate java deployment

Erik Bruchez-3
Bryn,

Yes, in theory everything *should* be covered by the fix, at least
that's the plan.

-Erik

On Wed, Sep 30, 2009 at 7:09 AM, Bryn Davies
<[hidden email]> wrote:

> Actually I spoke too soon - the addition of the f:url-norewrite attribute did solve the problem of using relative urls in the xforms:submission elements, but unfortunately it did not work when attempting to use a relative url to my schema from within the xforms:model definition. Erik, could you confirm that this is covered by the known issue to be fixed shortly?
>
> Thanks
>
> Bryn Davies
>
> -----Original Message-----
> From: Bryn Davies [mailto:[hidden email]]
> Sent: 30 September 2009 14:40
> To: [hidden email]
> Subject: [ops-users] RE: Re: resolving relative urls in separate java deployment
>
> Andy, that did indeed work. Many thanks for your help.
>
> Bryn Davies
>
>
>
> -----Original Message-----
> From: Andrew Bailey [mailto:[hidden email]]
> Sent: 29 September 2009 01:27
> To: [hidden email]
> Subject: [ops-users] Re: resolving relative urls in separate java deployment
>
> Bryn,
>
> You could try
>
> <xf:submission  .... f:url-norewrite="true"
>
> where the namespace is
> xmlns:f="http://orbeon.org/oxf/xml/formatting"
>
> so that orbeon doesnt rewrite the urls
>
> Hope it solves your problem
>
> Andy Bailey
>
> http://www.hazlorealidad.com
>
> On Fri, Sep 25, 2009 at 6:17 AM, Bryn Davies <[hidden email]> wrote:
>> Hi - I have followed the instructions for separate java deployment and
>> have orbeon deployed under path /orbeon and my app deployed in the
>> same tomcat server under path /ivs. Within my app, I have the orbeon
>> xforms filter configured thus:
>>
>>
>>
>>                 <filter-mapping>
>>
>>
>> <filter-name>orbeon-xforms-filter</filter-name>
>>
>>
>> <url-pattern>/protected/xforms/*</url-pattern>
>>
>>                                 <dispatcher>REQUEST</dispatcher>
>>
>>                                 <dispatcher>FORWARD</dispatcher>
>>
>>                 </filter-mapping>
>>
>>                 <filter-mapping>
>>
>>
>> <filter-name>orbeon-xforms-filter</filter-name>
>>
>>                                 <url-pattern>/orbeon/*</url-pattern>
>>
>>                                 <dispatcher>REQUEST</dispatcher>
>>
>>                                 <dispatcher>FORWARD</dispatcher>
>>
>>                 </filter-mapping>
>>
>>
>>
>> So my app has struts actions under the url
>> /ivs/protected/xforms/xxx.action which produce my xforms output, and
>> this is getting correctly processed by orbeon, so all well and good.
>>
>>
>>
>> My problem is that I am having difficulty correctly specifying my
>> xforms:submission elements to point to actions within the ivs
>> application using relative urls. For example, I have a save-portfolio
>> action with the url ivs/protected/savePortfolio.action. If I specify a
>> submission element
>> as:
>>
>>
>>
>> <xforms:submission id="save-submission" ref="instance('portfolio-instance')"
>>
>>
>> resource="/protected/savePortfolio.action" method="post"
>> replace="none">
>>
>>
>>
>> then orbeon resolves this to the url
>> <a href="http://host:port/ivs/orbeon/protected/savePortfolio.action">http://host:port/ivs/orbeon/protected/savePortfolio.action instead of
>> the required <a href="http://host:port/ivs/protected/savePortfolio.action">http://host:port/ivs/protected/savePortfolio.action . I
>> have managed to get the submissions working but only by specifying the
>> full address explicitly. However doing this causes an unnecessary
>> round trip to the proxy which I assume could be avoided by using
>> relative urls - if I can get them working.
>>
>>
>>
>> Any advice on where I am going wrong would be appreciated as I have
>> re-read the documentation several times and can't see which piece I
>> have misunderstood.
>>
>>
>>
>> Bryn Davies
>
>
> --
> 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
>
>


--
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