relative URLs to other applications within tomcat

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

relative URLs to other applications within tomcat

wolfmanstout
Hi everyone,

I want to use Orbeon as an interface to my standalone eXist installation, not the one included with Orbeon.  Both Orbeon and eXist are installed underneath tomcat, and are located at /ops and /exist, respectively.  The problem is that whenever I use a relative URL with an absolute path to exist (ie, href="/exist/rest/db/foo.xml"), it doesn't find the file.  

The causes seem to be twofold: 1) /exist is mapped to orbeon's exist installation, 2) orbeon rewrites all absolute paths as relative to orbeon, not the server itself.  I tried using f:url-norewrite="true", but this only worked in xforms, not xpl.  I'm guessing this is because the URL rewriter only works on xforms pages. I'm not sure, then, where I can reconfigure the way that XPL deals with absolute paths.  

Is there any way I can map /exist to the server-relative /exist instead of something underneath /ops, and have it stick for all URLs used by orbeon, both in xforms and xpl?  

Thanks a bunch,
~James



--
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: relative URLs to other applications within tomcat

Marcus-2
Hi,
i worked with an external eXist-DB too, but the only way i could make this
work was to explicit name the server-path, i.e.
http://localhost:8080/exist/... instadt of the realtiv path /exist/...
I wrote my important paths to an extra instance which i include to all pages
so when i change the server, i only have to change one config-file and all
will work well again. HTH

Marcus



----- Original Message -----
From: <[hidden email]>
To: <[hidden email]>
Sent: Tuesday, July 03, 2007 3:28 AM
Subject: [ops-users] relative URLs to other applications within tomcat


> Hi everyone,
>
> I want to use Orbeon as an interface to my standalone eXist installation,
> not the one included with Orbeon.  Both Orbeon and eXist are installed
> underneath tomcat, and are located at /ops and /exist, respectively.  The
> problem is that whenever I use a relative URL with an absolute path to
> exist (ie, href="/exist/rest/db/foo.xml"), it doesn't find the file.
>
> The causes seem to be twofold: 1) /exist is mapped to orbeon's exist
> installation, 2) orbeon rewrites all absolute paths as relative to orbeon,
> not the server itself.  I tried using f:url-norewrite="true", but this
> only worked in xforms, not xpl.  I'm guessing this is because the URL
> rewriter only works on xforms pages. I'm not sure, then, where I can
> reconfigure the way that XPL deals with absolute paths.
>
> Is there any way I can map /exist to the server-relative /exist instead of
> something underneath /ops, and have it stick for all URLs used by orbeon,
> both in xforms and xpl?
>
> Thanks a bunch,
> ~James
>
>

--------------------------------------------------------------------------------


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




--
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: relative URLs to other applications within tomcat

Erik Bruchez
Administrator
In reply to this post by wolfmanstout
James,

 > I want to use Orbeon as an interface to my standalone eXist
 > installation, not the one included with Orbeon.  Both Orbeon and
 > eXist are installed underneath tomcat, and are located at /ops and
 > /exist, respectively.  The problem is that whenever I use a relative
 > URL with an absolute path to exist (ie,
 > href="/exist/rest/db/foo.xml"), it doesn't find the file.
 >
 > The causes seem to be twofold: 1) /exist is mapped to orbeon's exist
 > installation, 2) orbeon rewrites all absolute paths as relative to
 > orbeon, not the server itself.  I tried using
 > f:url-norewrite="true", but this only worked in xforms, not xpl.
 > I'm guessing this is because the URL rewriter only works on xforms
 > pages. I'm not sure, then, where I can reconfigure the way that XPL
 > deals with absolute paths.

I assume you are using the href attributes on p:input? Is that the use
case which is failing?

In XPL, absolute paths in p:input/@href will be interpreted relatively
to the base URI of the XPL file, which is probably a URL like:

   oxf:/path/to/my.xpl

So you will get a resulting URI which is an "oxf:" URI, not an "http:"
URI. One workaround would be to use an absolute URI.

 > Is there any way I can map /exist to the server-relative /exist
 > instead of something underneath /ops, and have it stick for all URLs
 > used by orbeon, both in xforms and xpl?

One thing you can do is use the oxf:xforms-submission processor to
retrieve the data instead. This way you can, on the submission, use
f:url-norewrite="true".

   http://www.orbeon.com/ops/doc/processors-submission

The drawback is a little more code to write, and a probable
performance impact.

-Erik

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws