Multiple Portals in Single Orbeon war file

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

Multiple Portals in Single Orbeon war file

satishbejgum

How I create Multiple Portals in Single Orbeon war file, with different welcome pages for each.

 

Thanks & Regards

Satish B

 



--
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: Multiple Portals in Single Orbeon war file

Alexander Žaťko
This is how I did it:

1) create different directory for each of your portals in the resources directory.
2) Into the main page-flow.xml file add a line that will call switcher.xpl (see below about switcher.xpl) for root dir. requests:

    <page
        id = "switcher"
        path-info = "/"
        model = "switcher.xpl"/>

3) Add entries for your portals to the main page-flow.xml:

<!--portal1 -->
    <page
        id = "portal1"
        path-info = "/portal1*"
 & ;model = "portal1/page-flow.xml"/>

<!--portal2 -->
    <page
        id = "portal2"
        path-info = "/portal2*"
        model = "portal2/page-flow.xml"/>

4) create switcher.xpl. This serves to route requests for specific portals to the corresponding directories:

    <p:processor name="oxf:request">
        <p:input name="config">
            <config>
                <include>/request</include>
            </config>
        </p:input>
&nbs! p;  :output name="data" id="requestXML"/>
    </p:processor>
    
    <p:choose href="#requestXML">
        <p:when test="contains(/request/headers[1]/header[name='host']/value,'portal1')">
<p:processor name="oxf:redirect">
<p:input name="data">
<redirect-url>
   <server-side>true</server-side>
   <path-info>/portal1 </path-info>
</redirect-url>
</p:input>
</p:processor>
        </p:when>
        <p:when test="contains(/request/headers[1]/header[name='host']/value,'portal2')">
<p:processor name="oxf:redirect">
<p:input name="data">
<redirect-url>
   <server-side>true</server-side>
   <path-info>/portal2</path-info>
</redirect-url>
</p:processor>
        </p:when>
        <p:otherwise>
<p:processor name="oxf:redirect">
<p:input name="data">
<redirect-url>
   <server-side>true</server-side>
   <path-info>/not-found</path-info>
</redirect-url>
</p:input>
</p:processor>
        </p:otherwise>
    </p:choose>

To work with this setup on my dev. machine I added some entries to my hosts file:

127.0.0.1       loc.portal1.sk
127.0.0.1       loc. portal2.sk

Possibly there is a more elegant way to do this.

A.

On 28.11.2008, at 16:30, <[hidden email]> <[hidden email]> wrote:

How I create Multiple Portals in Single Orbeon war file, with different welcome pages for each.
 Thanks & Regards
Satish B
 

--
You receive this message as a subscriber of the  mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
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: Multiple Portals in Single Orbeon war file

satishbejgum

Hello Alexander Žatko,

 

I have done all mentioned changes, it works fine for Oberon but if I include that in Liferay I’m getting exceptions. Please find the attachment it contains exception. Please suggest me where I’m going wrong .

 

Thanks & Regards

Satish B

Software Engineer

Prodigy Systems & Services

Ph: +91 40 2360 8235 | +91 9177758177

Web: www.prodigygroupindia.com


From: Alexander Žatko [mailto:[hidden email]]
Sent: Saturday, November 29, 2008 10:59 AM
To: [hidden email]
Subject: [ops-users] Re: Multiple Portals in Single Orbeon war file

 

This is how I did it:

 

1) create different directory for each of your portals in the resources directory.

2) Into the main page-flow.xml file add a line that will call switcher.xpl (see below about switcher.xpl) for root dir. requests:

 

    <page

        id = "switcher"

        path-info = "/"

        model = "switcher.xpl"/>

 

3) Add entries for your portals to the main page-flow.xml:

 

            <!--portal1 -->

    <page

        id = "portal1"

        path-info = "/portal1*"

 & ;model = "portal1/page-flow.xml"/>

 

            <!--portal2 -->

    <page

        id = "portal2"

        path-info = "/portal2*"

        model = "portal2/page-flow.xml"/>

 

4) create switcher.xpl. This serves to route requests for specific portals to the corresponding directories:

 

    <p:processor name="oxf:request">

        <p:input name="config">

            <config>

                <include>/request</include>

            </config>

        </p:input>

&nbs! p;  :output name="data" id="requestXML"/>

    </p:processor>

    

    <p:choose href="#requestXML">

        <p:when test="contains(/request/headers[1]/header[name='host']/value,'portal1')">

                                    <p:processor name="oxf:redirect">

                                                <p:input name="data">

                                                            <redirect-url>

                                                               <server-side>true</server-side>

                                                               <path-info>/portal1 </path-info>

                                                            </redirect-url>

</p:input>

                                    </p:processor>

        </p:when>

        <p:when test="contains(/request/headers[1]/header[name='host']/value,'portal2')">

                                    <p:processor name="oxf:redirect">

                                                <p:input name="data">

                                                            <redirect-url>

                                                               <server-side>true</server-side>

                                                               <path-info>/portal2</path-info>

                                                            </redirect-url>

Thanks & Regards

Satish B

 


--
You receive this message as a subscriber of the  



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

untitled.JPG (135K) Download Attachment
Call Stack.doc (1M) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: RE: Re: Multiple Portals in Single Orbeon war file

Alexander Žaťko
Satish,

I have no experience (yet) integrating OF into Liferay, but maybe others on the list do.

Sorry.

A.


On 1.12.2008, at 18:19, <[hidden email]> wrote:

Hello Alexander Žatko,
 
I have done all mentioned changes, it works fine for Oberon but if I include that in Liferay I’m getting exceptions. Please find the attachment it contains exception. Please suggest me where I’m going wrong .
 
Thanks & Regards
Satish B
Software Engineer
Prodigy Systems & Services
Ph: +91 40 2360 8235 | +91 9177758177

From: Alexander Žatko [[hidden email]] 
Sent: Saturday, November 29, 2008 10:59 AM
To: [hidden email]
Subject: [ops-users] Re: Multiple Portals in Single Orbeon war file
 
This is how I did it:
 
1) create different directory for each of your portals in the resources directory.
2) Into the main page-flow.xml file add a line that will call switcher.xpl (see below about switcher.xpl) for root dir. requests:
 
    <page
        id = "switcher"
        path-info = "/"
        model = "switcher.xpl"/>
 
3) Add entries for your portals to the main page-flow.xml:
 
            <!--portal1 -->
    <page
        id = "portal1"
        path-info = "/portal1*"
 & ;model = "portal1/page-flow.xml"/>
 
            <!--portal2 -->
    <page
        id = "portal2"
        path-info = "/portal2*"
        model = "portal2/page-flow.xml"/>
 
4) create switcher.xpl. This serves to route requests for specific portals to the corresponding directories:
 
    <p:processor name="oxf:request">
        <p:input name="config">
            <config>
                <include>/request</include>
            </config>
        </p:input>
&nbs! p;  :output name="data" id="requestXML"/>
    </p:processor>
    
    <p:choose href="#requestXML">
        <p:when test="contains(/request/headers[1]/header[name='host']/value,'portal1')">
                                    <p:processor name="oxf:redirect">
                                                <p:input name="data">
                                                            <redirect-url>
                                                               <server-side>true</server-side>
                                                               <path-info>/portal1 </path-info>
                                                            </redirect-url>
</p:input>
                                    </p:processor>
        </p:when>
        <p:when test="contains(/request/headers[1]/header[name='host']/value,'portal2')">
                                    <p:processor name="oxf:redirect">
                                                <p:input name="data">
                                                            <redirect-url>
                                                               <server-side>true</server-side>
                                                               <path-info>/portal2</path-info>
                                                            </redirect-url>
Thanks & Regards
Satish B
 

--
You receive this message as a subscriber of the [hidden email]
OW2 mailing lists service home page: http://www.ow2.org/wws
 
<untitled.JPG><Call Stack.doc>

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
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