Relative path for submission?

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

Relative path for submission?

Dan Kereliuk
So I have a submission that looks something like this (the irrelevant attributes have been omitted to keep it simple):

<xf:submission method="post" action="/exist/queries/login.xql" replace="instance" f:url-norewrite="true"/> 

When I fire this submission, it appears to fail, as the instance to be replaced remains blank. However, when using the same submission above but with the full absolute path given (http://localhost:8080/exist/queries/login.xql), the replace works perfectly. I can also see the full expected XML when using replace="all", whether I use the relative path or the absolute one. The only time it fails is on replace="instance" with a relative path.

I'm using Orbeon 3.8 deployed on Tomcat 6.0 alongside eXist 1.4. The query is being executed from the file system by eXist's XQueryServlet (hence the '.xql' instead of 'xq'). I've set the crossContext in Tomcat, and I've set the "oxf.xforms.local-submission-forward" and "oxf.xforms.local-submission-include" properties to "true" in Orbeon's config files.

I really need to be able to use relative paths so I can avoid writing out the host portion, which will change constantly for me as I sync changes back and forth between my development server and my production server.
Reply | Threaded
Open this post in threaded view
|

Re: Relative path for submission?

Erik Bruchez
Administrator
Sorry it seems like we missed this message

Have you tried with a nightly build?

Also, as a workaround you could use a custom property in your properties-local.xml, and write your submission like:

<xf:submission action="{xxforms:property('my.property.uri')}/exist/queries/login.xql" ...>

-Erik

On Thu, Jan 20, 2011 at 12:47 PM, dk16 <[hidden email]> wrote:

So I have a submission that looks something like this (the irrelevant
attributes have been omitted to keep it simple):

<xf:submission method="post" action="/exist/queries/login.xql"
replace="instance" f:url-norewrite="true"/>

When I fire this submission, it appears to fail, as the instance to be
replaced remains blank. However, when using the same submission above but
with the full absolute path given
(http://localhost:8080/exist/queries/login.xql), the replace works
perfectly. I can also see the full expected XML when using replace="all",
whether I use the relative path or the absolute one. The only time it fails
is on replace="instance" with a relative path.

I'm using Orbeon 3.8 deployed on Tomcat 6.0 alongside eXist 1.4. The query
is being executed from the file system by eXist's XQueryServlet (hence the
'.xql' instead of 'xq'). I've set the crossContext in Tomcat, and I've set
the "oxf.xforms.local-submission-forward" and
"oxf.xforms.local-submission-include" properties to "true" in Orbeon's
config files.

I really need to be able to use relative paths so I can avoid writing out
the host portion, which will change constantly for me as I sync changes back
and forth between my development server and my production server.
--
View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Relative-path-for-submission-tp3228459p3228459.html
Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.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




--
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: Relative path for submission?

Dan Kereliuk
Thanks for the response. I first tried using the nightly build, while writing the URL relatively in every way I could think of, but with no luck.

Next I tried your workaround with the custom property. This would be a perfectly acceptable solution for me, and I was pleased to find that this does indeed work in submissions. However, it does not appear to work with the paths used in XIncludes, or in the @src attribute of an xforms instance. I can work around the @src attribute (ie. by firing a submission on xforms-ready with replace=instance instead), but XIncludes really cannot be avoided for me.

So now I guess I want to ask:
1. Is there a workaround for my problem with the workaround?
2. Is the relative URL problem a bug that may be fixed eventually?

Any further help is appreciated here.
Reply | Threaded
Open this post in threaded view
|

Re: Re: Relative path for submission?

Erik Bruchez
Administrator
I noticed that we have a bug for this already:

http://forge.ow2.org/tracker/index.php?func=detail&aid=315590&group_id=168&atid=350207

Now that's right, XInclude is not configurable this way directly. You could generate the document containing XInclude with XSLT, but that becomes complicated. Unless you happen to do that already?

I will have a look at the bug quickly to see if that's fixable in a reasonable time.

-Erik

On Tue, Feb 1, 2011 at 6:53 AM, dk16 <[hidden email]> wrote:

Thanks for the response. I first tried using the nightly build, while writing
the URL relatively in every way I could think of, but with no luck.

Next I tried your workaround with the custom property. This would be a
perfectly acceptable solution for me, and I was pleased to find that this
does indeed work in submissions. However, it does not appear to work with
the paths used in XIncludes, or in the @src attribute of an xforms instance.
I can work around the @src attribute (ie. by firing a submission on
xforms-ready with replace=instance instead), but XIncludes really cannot be
avoided for me.

So now I guess I want to ask:
1. Is there a workaround for my problem with the workaround?
2. Is the relative URL problem a bug that may be fixed eventually?

Any further help is appreciated here.
--
View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Relative-path-for-submission-tp3228459p3251685.html
Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.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




--
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: Relative path for submission?

Erik Bruchez
Administrator
This should now be fixed. I entered a new bug as, after all, this was a different problem from the bug I originally linked to:


Commit:


-Erik

On Wed, Feb 2, 2011 at 7:10 PM, Erik Bruchez <[hidden email]> wrote:
I noticed that we have a bug for this already:

http://forge.ow2.org/tracker/index.php?func=detail&aid=315590&group_id=168&atid=350207

Now that's right, XInclude is not configurable this way directly. You could generate the document containing XInclude with XSLT, but that becomes complicated. Unless you happen to do that already?

I will have a look at the bug quickly to see if that's fixable in a reasonable time.

-Erik

On Tue, Feb 1, 2011 at 6:53 AM, dk16 <[hidden email]> wrote:

Thanks for the response. I first tried using the nightly build, while writing
the URL relatively in every way I could think of, but with no luck.

Next I tried your workaround with the custom property. This would be a
perfectly acceptable solution for me, and I was pleased to find that this
does indeed work in submissions. However, it does not appear to work with
the paths used in XIncludes, or in the @src attribute of an xforms instance.
I can work around the @src attribute (ie. by firing a submission on
xforms-ready with replace=instance instead), but XIncludes really cannot be
avoided for me.

So now I guess I want to ask:
1. Is there a workaround for my problem with the workaround?
2. Is the relative URL problem a bug that may be fixed eventually?

Any further help is appreciated here.
--
View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Relative-path-for-submission-tp3228459p3251685.html
Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.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





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