Proxy and URL rewriting

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

Proxy and URL rewriting

Eric van der Vlist
Hi,

For the new version of XMLfr, I am using OrbeonForms through Apache's
mod-proxy.

This is very convenient because that lets me switch to this new
architecture sections after sections.

For instance, to enable our new "Planète XMLfr", I have added the
following rules:

RewriteRule /actualites/planete/(.*) http://localhost:8080/of-lucene/xmlfr/actualites/planete/$1        [P]
ProxyPassReverse /actualites/planete/ http://localhost:8080/of-lucene/xmlfr/actualites/planete/

The problem is of course that URIs need to be rewritten to correct the
mismatch between the external and servlet schemes.

I am doing so with an additional test in the episode pipeline that
checks if the request has been proxied and call a XSLT transformation to
do this adaptation when needed.
 
This is working fine for resources which addresses is exposed in the
(X)HTML documents, but I haven't yet found a way to do the same for
those in xforms:submission actions.

Is there a way to do so?

Thanks,

Eric

--
GPG-PGP: 2A528005
Carnet web :
           http://eric.van-der-vlist.com/blog?t=category&a=Fran%C3%A7ais
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------


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

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Proxy and URL rewriting

Eric van der Vlist

Le lundi 14 janvier 2008 à 15:41 +0100, Eric van der Vlist a écrit :

> Hi,
>
> For the new version of XMLfr, I am using OrbeonForms through Apache's
> mod-proxy.
>
> This is very convenient because that lets me switch to this new
> architecture sections after sections.
>
> For instance, to enable our new "Planète XMLfr", I have added the
> following rules:
>
> RewriteRule /actualites/planete/(.*) http://localhost:8080/of-lucene/xmlfr/actualites/planete/$1        [P]
> ProxyPassReverse /actualites/planete/ http://localhost:8080/of-lucene/xmlfr/actualites/planete/
>
> The problem is of course that URIs need to be rewritten to correct the
> mismatch between the external and servlet schemes.
>
> I am doing so with an additional test in the episode pipeline that
> checks if the request has been proxied and call a XSLT transformation to
> do this adaptation when needed.
>  
> This is working fine for resources which addresses is exposed in the
> (X)HTML documents, but I haven't yet found a way to do the same for
> those in xforms:submission actions.
>
> Is there a way to do so?
Digging into the code and the documentation, I think that I have found a
way to do so using f:url-norewrite="true" (seems to be working for
xforms as well as for plain xhtml).

Instead of doing the rewriting like I am doing right now, would you
recommend using this attribute?

Thanks,

Eric

> Thanks,
>
> Eric
>
--
GPG-PGP: 2A528005
Le premier annuaire des apiculteurs 100% XML!
                                                http://apiculteurs.info/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------


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

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Proxy and URL rewriting

Eric van der Vlist

Le lundi 14 janvier 2008 à 16:25 +0100, Eric van der Vlist a écrit :

> Le lundi 14 janvier 2008 à 15:41 +0100, Eric van der Vlist a écrit :
> > Hi,
> >
> > For the new version of XMLfr, I am using OrbeonForms through Apache's
> > mod-proxy.
> >
> > This is very convenient because that lets me switch to this new
> > architecture sections after sections.
> >
> > For instance, to enable our new "Planète XMLfr", I have added the
> > following rules:
> >
> > RewriteRule /actualites/planete/(.*) http://localhost:8080/of-lucene/xmlfr/actualites/planete/$1        [P]
> > ProxyPassReverse /actualites/planete/ http://localhost:8080/of-lucene/xmlfr/actualites/planete/
> >
> > The problem is of course that URIs need to be rewritten to correct the
> > mismatch between the external and servlet schemes.
> >
> > I am doing so with an additional test in the episode pipeline that
> > checks if the request has been proxied and call a XSLT transformation to
> > do this adaptation when needed.
> >  
> > This is working fine for resources which addresses is exposed in the
> > (X)HTML documents, but I haven't yet found a way to do the same for
> > those in xforms:submission actions.
> >
> > Is there a way to do so?
>
> Digging into the code and the documentation, I think that I have found a
> way to do so using f:url-norewrite="true" (seems to be working for
> xforms as well as for plain xhtml).
>
> Instead of doing the rewriting like I am doing right now, would you
> recommend using this attribute?
I eventually managed to get something working, but that seems fragile
and messy to me...

You can see the result at http://test.xmlfr.org/chercher/ and the code
under http://dev.xmlfr.org/svn/webapps/branches/lucene/.

I wrote a new epilogue.xpl [1] that supports only servlets (I don't need
to support portlets) and differs from the standard one in the following
ways:

     1. I apply the theme before the XForms epilogue. The reason for
        that is that I'll be adding XForms control in the theme itself
        in a future version.
     2. After the theme, I test if the request is proxied through the
        XMLfr web site and if so, I transform using re-rewrite.xsl [2]
        which adds f:url-norewrite where needed (this happens to be
        tricky and I am probably missing many corner cases).
     3. The XForms epilogue and pretty much everything from the standard
        servlet-epilogue comes after that.

What's really tricky is to support XForms load controls to computed
addresses. What I have done is passing the info whether the request is
proxied or not in the instance (re-rewrite.xsl does that) and then use
XPath if/then/else statements to adapt the values before executing the
load.

This is in serch.xsl [3] and that gives stuff such as:

<xf:group ref="field[name='uri']/content">
  <xf:trigger appearance="xxforms:link">
    <xf:label>
      <xf:output value="if ( starts-with(., '/xmlfr/') )
                          then substring-after(., '/xmlfr')
                          else . " />
    </xf:label>
    <xf:action ev:event="DOMActivate">
       <xf:setvalue ref="." value="if ( starts-with(., '/xmlfr/') and (instance('scratchpad')/proxied = 'true' ))
                                   then substring-after(., '/xmlfr')
                                   else . "/>
       <xf:load ref="." show="replace"/>
    </xf:action>
  </xf:trigger>
</xf:group>


[1] http://dev.xmlfr.org/svn/webapps/branches/lucene/orbeon/WEB-INF/resources/xmlfr/epilogue.xpl
[2] http://dev.xmlfr.org/svn/webapps/branches/lucene/orbeon/WEB-INF/resources/xmlfr/re-rewrite.xsl
[3] http://dev.xmlfr.org/svn/webapps/branches/lucene/orbeon/WEB-INF/resources/xmlfr/chercher/search.xsl

Again, this seems to be working fine, but I am pretty sure there are
better ways to do it!

What am I missing?

Thanks,

Eric

> Thanks,
>
> Eric
>
> > Thanks,
> >
> > Eric
> >
--
GPG-PGP: 2A528005
Lisez-moi sur XMLfr.
                       http://xmlfr.org/index/person/eric+van+der+vlist/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------


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

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Proxy and URL rewriting

Alessandro Vernet
Administrator
In reply to this post by Eric van der Vlist
Eric,

On Jan 14, 2008 6:41 AM, Eric van der Vlist <[hidden email]> wrote:
> RewriteRule     /actualites/planete/(.*)        http://localhost:8080/of-lucene/xmlfr/actualites/planete/$1     [P]
> ProxyPassReverse        /actualites/planete/    http://localhost:8080/of-lucene/xmlfr/actualites/planete/
>
> The problem is of course that URIs need to be rewritten to correct the
> mismatch between the external and servlet schemes.

I am not sure that I understand the issue well. You wouldn't have that
problem if /actualites/planete/ was served by
http://localhost:8080/actualites/planete/, would you? If you wouldn't,
then why not do just that? Of if you have something under
http://localhost:8080/actualites/planete/ (like the previous version
of that page), then you could maybe proxy to
http://localhost:8081/actualites/planete/ (another port). Am I missing
the point?

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: Proxy and URL rewriting

Eric van der Vlist
Hi Alex,

Le lundi 14 janvier 2008 à 15:08 -0800, Alessandro Vernet a écrit :

> Eric,
>
> On Jan 14, 2008 6:41 AM, Eric van der Vlist <[hidden email]> wrote:
> > RewriteRule     /actualites/planete/(.*)        http://localhost:8080/of-lucene/xmlfr/actualites/planete/$1     [P]
> > ProxyPassReverse        /actualites/planete/    http://localhost:8080/of-lucene/xmlfr/actualites/planete/
> >
> > The problem is of course that URIs need to be rewritten to correct the
> > mismatch between the external and servlet schemes.
>
> I am not sure that I understand the issue well. You wouldn't have that
> problem if /actualites/planete/ was served by
> http://localhost:8080/actualites/planete/, would you? If you wouldn't,
> then why not do just that? Of if you have something under
> http://localhost:8080/actualites/planete/ (like the previous version
> of that page), then you could maybe proxy to
> http://localhost:8081/actualites/planete/ (another port). Am I missing
> the point?
Hmmm... I might be the one who is missing the point!

Up to now, I have preferred to keep a full Orbeon install in which I am
adding new applications and that's the reason why I have both servlet
context (/of-lucene) and application (/xmlfr) parts in my URIs.

The benefit is that I can deploy several applications in the same
servlet, that I keep an access to local samples and documentation and
that I clearly differentiate the URI spaces from orbeon and friends
(including eXist) and from my application (/xmlfr encapsulate everything
that is specific to my application and everything else is elsewhere).

Having URIs such as http://localhost:8080/actualites/planete/ would
definitely help for the rewriting, but (aside from the fact that I need
to find out how this can be achieved), what would be the URIs for Orbeon
specific resources and eXist?

Thanks,

Eric

> Alex

--
GPG-PGP: 2A528005
If you have a XML document, you have its schema.
                                                  http://examplotron.org
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------


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

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Proxy and URL rewriting

Alessandro Vernet
Administrator
On Jan 14, 2008 10:51 PM, Eric van der Vlist <[hidden email]> wrote:
> Hmmm... I might be the one who is missing the point!

Just to make sure that I am not completely, hopelessly lost, you are
saying that in the browser you have /actualites/planete/, but that
Tomcat needs to receive a request to
/of-lucene/xmlfr/actualites/planete/. But then you have a problem with
absolute URLs as if you write /planete/something, Orbeon Forms will
rewrite it in /of-lucene/planete/something (adding of-lucene), which
doesn't work as there is no of-lucene "seen from the outside". Is that
it?

> The benefit is that I can deploy several applications in the same
> servlet, that I keep an access to local samples and documentation and
> that I clearly differentiate the URI spaces from orbeon and friends
> (including eXist) and from my application (/xmlfr encapsulate everything
> that is specific to my application and everything else is elsewhere).

I can see the benefit, but it makes things more complicated with
absolute URLs, and so far I have been able to avoid this :).

> Having URIs such as http://localhost:8080/actualites/planete/ would
> definitely help for the rewriting, but (aside from the fact that I need
> to find out how this can be achieved), what would be the URIs for Orbeon
> specific resources and eXist?

If you have pages all over the site that are handled by Orbeon, then I
would deploy Orbeon as the default servlet on a given instance of
Tomcat, forward the URI that should be handed by Orbeon to that
instance of Tomcat. Orbeon specific resources would be served from
/ops.

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: Proxy and URL rewriting

Eric van der Vlist
Hi Alex,

Le mardi 15 janvier 2008 à 19:26 -0800, Alessandro Vernet a écrit :

> On Jan 14, 2008 10:51 PM, Eric van der Vlist <[hidden email]> wrote:
> > Hmmm... I might be the one who is missing the point!
>
> Just to make sure that I am not completely, hopelessly lost, you are
> saying that in the browser you have /actualites/planete/, but that
> Tomcat needs to receive a request to
> /of-lucene/xmlfr/actualites/planete/. But then you have a problem with
> absolute URLs as if you write /planete/something, Orbeon Forms will
> rewrite it in /of-lucene/planete/something (adding of-lucene), which
> doesn't work as there is no of-lucene "seen from the outside". Is that
> it?
Almost ;-) ... That's it except that I don't write (in my XHTML
documents) /actualites/planete/ but /xmlfr/actualites/planete/ which is
translated as /of-lucene/xmlfr/actualites/planete/ and that I need to
rewrite back as /actualites/planete/.

Thinking about it, I wonder if an option wouldn't be to use relative
URIs together with f:url-norewrite="true". There are side issues, but
that might be simpler than my current solution.

> > The benefit is that I can deploy several applications in the same
> > servlet, that I keep an access to local samples and documentation and
> > that I clearly differentiate the URI spaces from orbeon and friends
> > (including eXist) and from my application (/xmlfr encapsulate everything
> > that is specific to my application and everything else is elsewhere).
>
> I can see the benefit, but it makes things more complicated with
> absolute URLs, and so far I have been able to avoid this :).

You're right about the complexity!

The other reason I am doing that is to be able to host several
applications under the same orbeon servlet. I am not doing so right now
because they use different versions of OrbeonForms, but with this
architecture, I could host xmlfr.org, dyomedea.com and apiculteurs.info
under the same servlet.

> > Having URIs such as http://localhost:8080/actualites/planete/ would
> > definitely help for the rewriting, but (aside from the fact that I need
> > to find out how this can be achieved), what would be the URIs for Orbeon
> > specific resources and eXist?
>
> If you have pages all over the site that are handled by Orbeon, then I
> would deploy Orbeon as the default servlet on a given instance of
> Tomcat, forward the URI that should be handed by Orbeon to that
> instance of Tomcat. Orbeon specific resources would be served from
> /ops.
It's my turn to need a sanity check...

That would mean:

     1. Defining OrbeonForms as the default servlet in Tomcat's root
        web.xml.
     2. Completely replacing the content of WEB-INF/resources with my
        own stuff instead of just adding new stuff to the standard one.

Is that all?

Also, that would mean that to run several applications under the same
Tomcat instance, I would have to define different services using
different ports in Tomcat's server.xml?

Thanks,

Eric

> Alex
> pièce jointe document plein texte (message-footer.txt)
> --
> 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
--
GPG-PGP: 2A528005
Le premier annuaire des apiculteurs 100% XML!
                                                http://apiculteurs.info/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------


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

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Proxy and URL rewriting

Alessandro Vernet
Administrator
On Jan 15, 2008 11:25 PM, Eric van der Vlist <[hidden email]> wrote:
> Thinking about it, I wonder if an option wouldn't be to use relative
> URIs together with f:url-norewrite="true". There are side issues, but
> that might be simpler than my current solution.

Yes, I would also use relative URLs if you can and it is not too
unnatural to do so (e.g. are deep down a certain hierarchy and have to
write something like ../../../../images/myimage.png).

> The other reason I am doing that is to be able to host several
> applications under the same orbeon servlet. I am not doing so right now
> because they use different versions of OrbeonForms, but with this
> architecture, I could host xmlfr.org, dyomedea.com and apiculteurs.info
> under the same servlet.

OK, I understand.

> It's my turn to need a sanity check...
>
> That would mean:
>
>      1. Defining OrbeonForms as the default servlet in Tomcat's root
>         web.xml.
>      2. Completely replacing the content of WEB-INF/resources with my
>         own stuff instead of just adding new stuff to the standard one.
>
> Is that all?
Right. This is what most people are doing, modulo two differences:

* Most people who have multiple Orbeon Forms applications are fine
deploying each one of them under a separate context path, which is
also visible from the outside. This make sense if you are building
applications (say an expense report application under /expense-report
and a taxes application under /taxes).
* You only need to scrap the content of resources/apps/*.

In some cases (if you are fine using the same version of Orbeon Forms)
for all your applications, you can even have one Orbeon Forms war,
with your application under apps (apps/expense-report, apps/taxes).
Otherwise you need one war per application (like you are doing).

> Also, that would mean that to run several applications under the same
> Tomcat instance, I would have to define different services using
> different ports in Tomcat's server.xml?

I guess you would. But I never got a chance to try this out :).

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: Proxy and URL rewriting

Erik Bruchez
Administrator
I did not follow the whole thread, but if the result of the proxying  
is that only the context changes, you could try setting the  
"oxf.servlet.context" request attribute. This will override the actual  
servlet context, including for purposes of URL rewriting.

-Erik

On Jan 17, 2008, at 11:05 PM, Alessandro Vernet wrote:

> On Jan 15, 2008 11:25 PM, Eric van der Vlist <[hidden email]> wrote:
>> Thinking about it, I wonder if an option wouldn't be to use relative
>> URIs together with f:url-norewrite="true". There are side issues, but
>> that might be simpler than my current solution.
>
> Yes, I would also use relative URLs if you can and it is not too
> unnatural to do so (e.g. are deep down a certain hierarchy and have to
> write something like ../../../../images/myimage.png).
>
>> The other reason I am doing that is to be able to host several
>> applications under the same orbeon servlet. I am not doing so right  
>> now
>> because they use different versions of OrbeonForms, but with this
>> architecture, I could host xmlfr.org, dyomedea.com and  
>> apiculteurs.info
>> under the same servlet.
>
> OK, I understand.
>
>> It's my turn to need a sanity check...
>>
>> That would mean:
>>
>>     1. Defining OrbeonForms as the default servlet in Tomcat's root
>>        web.xml.
>>     2. Completely replacing the content of WEB-INF/resources with my
>>        own stuff instead of just adding new stuff to the standard  
>> one.
>>
>> Is that all?
>
> Right. This is what most people are doing, modulo two differences:
>
> * Most people who have multiple Orbeon Forms applications are fine
> deploying each one of them under a separate context path, which is
> also visible from the outside. This make sense if you are building
> applications (say an expense report application under /expense-report
> and a taxes application under /taxes).
> * You only need to scrap the content of resources/apps/*.
>
> In some cases (if you are fine using the same version of Orbeon Forms)
> for all your applications, you can even have one Orbeon Forms war,
> with your application under apps (apps/expense-report, apps/taxes).
> Otherwise you need one war per application (like you are doing).
>
>> Also, that would mean that to run several applications under the same
>> Tomcat instance, I would have to define different services using
>> different ports in Tomcat's server.xml?
>
> I guess you would. But I never got a chance to try this out :).
>
> 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
--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Proxy and URL rewriting

Eric van der Vlist
Hi Erik,

Le vendredi 18 janvier 2008 à 19:55 +0000, Erik Bruchez a écrit :
> I did not follow the whole thread, but if the result of the proxying  
> is that only the context changes, you could try setting the  
> "oxf.servlet.context" request attribute. This will override the actual  
> servlet context, including for purposes of URL rewriting.

That's an interesting idea, but in my case, I need to remove both the
context and the first path step so that
<a href="http://localhost:8080:/context/app/path">http://localhost:8080:/context/app/path becomes http://example.com/path.

Eric

--
GPG-PGP: 2A528005
Le premier annuaire des apiculteurs 100% XML!
                                                http://apiculteurs.info/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------


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

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Proxy and URL rewriting

Eric van der Vlist
In reply to this post by Alessandro Vernet
Hi Alex,

Le jeudi 17 janvier 2008 à 15:05 -0800, Alessandro Vernet a écrit :
> On Jan 15, 2008 11:25 PM, Eric van der Vlist <[hidden email]> wrote:
> > Thinking about it, I wonder if an option wouldn't be to use relative
> > URIs together with f:url-norewrite="true". There are side issues, but
> > that might be simpler than my current solution.
>
> Yes, I would also use relative URLs if you can and it is not too
> unnatural to do so (e.g. are deep down a certain hierarchy and have to
> write something like ../../../../images/myimage.png).

Sure!

That's also an issue when you want to add these paths in transformations
which are common to several level of hierarchy.

> > The other reason I am doing that is to be able to host several
> > applications under the same orbeon servlet. I am not doing so right now
> > because they use different versions of OrbeonForms, but with this
> > architecture, I could host xmlfr.org, dyomedea.com and apiculteurs.info
> > under the same servlet.

Another thing I am doing is to host two versions of the same application
(a stable and a beta one) as 2 different contexts.

> OK, I understand.
>
> > It's my turn to need a sanity check...
> >
> > That would mean:
> >
> >      1. Defining OrbeonForms as the default servlet in Tomcat's root
> >         web.xml.
> >      2. Completely replacing the content of WEB-INF/resources with my
> >         own stuff instead of just adding new stuff to the standard one.
> >
> > Is that all?
>
> Right. This is what most people are doing, modulo two differences:
>
> * Most people who have multiple Orbeon Forms applications are fine
> deploying each one of them under a separate context path, which is
> also visible from the outside. This make sense if you are building
> applications (say an expense report application under /expense-report
> and a taxes application under /taxes).
> * You only need to scrap the content of resources/apps/*.
Yep.

> In some cases (if you are fine using the same version of Orbeon Forms)
> for all your applications, you can even have one Orbeon Forms war,
> with your application under apps (apps/expense-report, apps/taxes).
> Otherwise you need one war per application (like you are doing).
>
> > Also, that would mean that to run several applications under the same
> > Tomcat instance, I would have to define different services using
> > different ports in Tomcat's server.xml?
>
> I guess you would. But I never got a chance to try this out :).
I'd like to finish my work on the search engine first (I am working on
an integration of Lucene) and after that I'll see if I do some tests and
publish the outcome.

Thanks,

Eric

> Alex

--
GPG-PGP: 2A528005
Curious about Relax NG? Read my book online.
                                   http://books.xmlschemata.org/relaxng/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------


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

signature.asc (196 bytes) Download Attachment