multiple websites configuration

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

multiple websites configuration

KurtStam
Hi guys,

I'm a little confused how to set up multiple websites on ofbiz. Under
applications I see the ecommerce directory. In it I see a webapp
directory. It contains the ecommerce webapp. I copied this directory and
called is webapp2. Then I modified the ofbiz-component.xml to read:

  <webapp name="ecommerce"
        title="ECommerce"
        server="default-server"
        location="webapp/ecommerce"
        mount-point="/ecommerce"
        app-bar-display="false">
 <virtual-host host-name="admin.mydomain.com"/>
     </webapp>
  <webapp name="ecommerce2"
        title="ECommerce2"
        server="default-server"
        location="webapp/ecommerce2"
        mount-point="/"
        app-bar-display="false">
 <virtual-host host-name="www.mydomain.com"/>
     </webapp>

And I modified the web.xml of ecommerce2 to contain the unique id values
of the new website.

It all seems to work ok, except when a user wants to log into the
ecommerce2 site he gets refused, saying he has not enough permissions.
Logging into ecommerce works just fine.

Am I supposed to copy the entire applications/ecommerce directory? What am
I missing? I found this link
http://ofbizwiki.go-integral.com/Wiki.jsp?page=SSSMultiStores1
but if there is any other good documentation on this out there I'd greatly
appriciate it.

I'm using opentabs-0.9.2.


Thank you,

--Kurt

Reply | Threaded
Open this post in threaded view
|

Re: multiple websites configuration

Kurt T Stam-3
No one out there that uses multiple websites? All I need to know is from
where I'm supposed to clone ecommerce: the entire ecommerce application
or just the ecommerce webapp. I'll figure out from there why I'm having
this authentication problem.

Thx,

--Kurt


Kurt T Stam wrote:

> Hi guys,
>
> I'm a little confused how to set up multiple websites on ofbiz. Under
> applications I see the ecommerce directory. In it I see a webapp
> directory. It contains the ecommerce webapp. I copied this directory and
> called is webapp2. Then I modified the ofbiz-component.xml to read:
>
>   <webapp name="ecommerce"
>         title="ECommerce"
>         server="default-server"
>         location="webapp/ecommerce"
>         mount-point="/ecommerce"
>         app-bar-display="false">
>  <virtual-host host-name="admin.mydomain.com"/>
>      </webapp>
>   <webapp name="ecommerce2"
>         title="ECommerce2"
>         server="default-server"
>         location="webapp/ecommerce2"
>         mount-point="/"
>         app-bar-display="false">
>  <virtual-host host-name="www.mydomain.com"/>
>      </webapp>
>
> And I modified the web.xml of ecommerce2 to contain the unique id values
> of the new website.
>
> It all seems to work ok, except when a user wants to log into the
> ecommerce2 site he gets refused, saying he has not enough permissions.
> Logging into ecommerce works just fine.
>
> Am I supposed to copy the entire applications/ecommerce directory? What am
> I missing? I found this link
> http://ofbizwiki.go-integral.com/Wiki.jsp?page=SSSMultiStores1
> but if there is any other good documentation on this out there I'd greatly
> appriciate it.
>
> I'm using opentabs-0.9.2.
>
>
> Thank you,
>
> --Kurt
>  

Reply | Threaded
Open this post in threaded view
|

Re: multiple websites configuration

BJ Freeman
You title seems to refer to multiple domain websites
if you are attempting that, then the approach you are using is not correct.
if you are attempting to created many ecommerce sites under one domain,
then the approach you are describing is somewhat the right direction.

Have you read the OFBizBasicProductionSetup.pdf ?

Kurt T Stam sent the following on 10/4/2006 5:08 PM:

> No one out there that uses multiple websites? All I need to know is from
> where I'm supposed to clone ecommerce: the entire ecommerce application
> or just the ecommerce webapp. I'll figure out from there why I'm having
> this authentication problem.
>
> Thx,
>
> --Kurt
>
>
> Kurt T Stam wrote:
>> Hi guys,
>>
>> I'm a little confused how to set up multiple websites on ofbiz. Under
>> applications I see the ecommerce directory. In it I see a webapp
>> directory. It contains the ecommerce webapp. I copied this directory and
>> called is webapp2. Then I modified the ofbiz-component.xml to read:
>>
>>   <webapp name="ecommerce"
>>         title="ECommerce"
>>         server="default-server"
>>         location="webapp/ecommerce"
>>         mount-point="/ecommerce"
>>         app-bar-display="false">
>>  <virtual-host host-name="admin.mydomain.com"/>
>>      </webapp>
>>   <webapp name="ecommerce2"
>>         title="ECommerce2"
>>         server="default-server"
>>         location="webapp/ecommerce2"
>>         mount-point="/"
>>         app-bar-display="false">
>>  <virtual-host host-name="www.mydomain.com"/>
>>      </webapp>
>>
>> And I modified the web.xml of ecommerce2 to contain the unique id values
>> of the new website.
>>
>> It all seems to work ok, except when a user wants to log into the
>> ecommerce2 site he gets refused, saying he has not enough permissions.
>> Logging into ecommerce works just fine.
>>
>> Am I supposed to copy the entire applications/ecommerce directory? What am
>> I missing? I found this link
>> http://ofbizwiki.go-integral.com/Wiki.jsp?page=SSSMultiStores1
>> but if there is any other good documentation on this out there I'd greatly
>> appriciate it.
>>
>> I'm using opentabs-0.9.2.
>>
>>
>> Thank you,
>>
>> --Kurt
>>  
>
>
Reply | Threaded
Open this post in threaded view
|

Re: multiple websites configuration

Andrew Sykes
In reply to this post by Kurt T Stam-3
Kurt,

I'd warn against modifying the ofbiz-component.xml inside ecommerce.

This is both unnecessary and means you're mixing your code and OFBiz
code which will lead to difficulties if you need to do an upgrade.

There is a directory specifically for bespoke applications called "hot-
deploy". You can use the ecommerce application as a starting point for
your new app. Simply copy the ecommerce app into hot-deploy change the
mount point, application name etc and you will have a second
application.

You'll notice that the controller.xml for this new app refers to
artifacts in the original ecommerce app, for example...
<view-map name="ViewRequest" type="screen"
page="component://ecommerce/widget/RequestScreens.xml#ViewRequest"/>

Note "component://ecommerce". You can therefore remove everything from
the new ecommerce directories that are simply duplicates of the original
ecommerce code. This means that you now will only have copies of
original ecommerce code where you have had to make specific changes,
let's say the new app was called "newecommerce", you would reference
like this...
"component://newecommerce/....."

Once you have your app setup, you can decide whether you need to simply
mount each app to a different place
e.g. /newecommerce1 /newecommerce2 /newecommerce3 etc, which would be
fine if you were using OFBiz in conjunction with Apache, or if it's
standalone, you might want to use the virtualhost stuff.

I hope that helps clarify.
--
Kind Regards
Andrew Sykes <[hidden email]>
Sykes Development Ltd
http://www.sykesdevelopment.com

Reply | Threaded
Open this post in threaded view
|

Re: multiple websites configuration

Kurt T Stam-3
Andrew this is exactly what I need, and your comments exactly addresses
other concerns I had while I was doing what I was doing. Thanks so much!

--Kurt

Andrew Sykes wrote:

> Kurt,
>
> I'd warn against modifying the ofbiz-component.xml inside ecommerce.
>
> This is both unnecessary and means you're mixing your code and OFBiz
> code which will lead to difficulties if you need to do an upgrade.
>
> There is a directory specifically for bespoke applications called "hot-
> deploy". You can use the ecommerce application as a starting point for
> your new app. Simply copy the ecommerce app into hot-deploy change the
> mount point, application name etc and you will have a second
> application.
>
> You'll notice that the controller.xml for this new app refers to
> artifacts in the original ecommerce app, for example...
> <view-map name="ViewRequest" type="screen"
> page="component://ecommerce/widget/RequestScreens.xml#ViewRequest"/>
>
> Note "component://ecommerce". You can therefore remove everything from
> the new ecommerce directories that are simply duplicates of the original
> ecommerce code. This means that you now will only have copies of
> original ecommerce code where you have had to make specific changes,
> let's say the new app was called "newecommerce", you would reference
> like this...
> "component://newecommerce/....."
>
> Once you have your app setup, you can decide whether you need to simply
> mount each app to a different place
> e.g. /newecommerce1 /newecommerce2 /newecommerce3 etc, which would be
> fine if you were using OFBiz in conjunction with Apache, or if it's
> standalone, you might want to use the virtualhost stuff.
>
> I hope that helps clarify.
>  

Reply | Threaded
Open this post in threaded view
|

Re: multiple websites configuration

cjhowe
Instead of copying the ecommerce app, you may prefer
this approach
http://ofbizwiki.go-integral.com/Wiki.jsp?page=FAQ21

The advantage of this approach is that it's likely you
only need to maintain the pieces that you modify.
With the approach that Andrew suggested, if you copy
all of the ecommerce files and change them to
newecommerce then you must maintain all of
newecommerce and will not benefit from any advancement
in the ofbiz community's ecommerce without starting
over in your application.

--- Kurt T Stam <[hidden email]> wrote:

> Andrew this is exactly what I need, and your
> comments exactly addresses
> other concerns I had while I was doing what I was
> doing. Thanks so much!
>
> --Kurt
>
> Andrew Sykes wrote:
> > Kurt,
> >
> > I'd warn against modifying the ofbiz-component.xml
> inside ecommerce.
> >
> > This is both unnecessary and means you're mixing
> your code and OFBiz
> > code which will lead to difficulties if you need
> to do an upgrade.
> >
> > There is a directory specifically for bespoke
> applications called "hot-
> > deploy". You can use the ecommerce application as
> a starting point for
> > your new app. Simply copy the ecommerce app into
> hot-deploy change the
> > mount point, application name etc and you will
> have a second
> > application.
> >
> > You'll notice that the controller.xml for this new
> app refers to
> > artifacts in the original ecommerce app, for
> example...
> > <view-map name="ViewRequest" type="screen"
> >
>
page="component://ecommerce/widget/RequestScreens.xml#ViewRequest"/>

> >
> > Note "component://ecommerce". You can therefore
> remove everything from
> > the new ecommerce directories that are simply
> duplicates of the original
> > ecommerce code. This means that you now will only
> have copies of
> > original ecommerce code where you have had to make
> specific changes,
> > let's say the new app was called "newecommerce",
> you would reference
> > like this...
> > "component://newecommerce/....."
> >
> > Once you have your app setup, you can decide
> whether you need to simply
> > mount each app to a different place
> > e.g. /newecommerce1 /newecommerce2 /newecommerce3
> etc, which would be
> > fine if you were using OFBiz in conjunction with
> Apache, or if it's
> > standalone, you might want to use the virtualhost
> stuff.
> >
> > I hope that helps clarify.
> >  
>
>

Reply | Threaded
Open this post in threaded view
|

Re: multiple websites configuration

Andrew Sykes
Kurt, Chris,

Just to clarify, I was not suggesting you maintain an entire copy of
ecommerce. My suggestion was to delete everything you didn't need and
simply reference from the original ecommerce.

More advanced users generally approach this the other way around, i.e.
build an application and see what they can use from the codebase as they
go, but if this is your first time, you might find it easier to start by
making a copy and deleting things you aren't going to change. At least
that way you start with a working application, which for a newbie is
normally fairly important as you don't want to begin with a whole lot of
exotic unfamiliar errors!

Andrew


On Thu, 2006-10-05 at 05:54 -0700, Chris Howe wrote:

> Instead of copying the ecommerce app, you may prefer
> this approach
> http://ofbizwiki.go-integral.com/Wiki.jsp?page=FAQ21
>
> The advantage of this approach is that it's likely you
> only need to maintain the pieces that you modify.
> With the approach that Andrew suggested, if you copy
> all of the ecommerce files and change them to
> newecommerce then you must maintain all of
> newecommerce and will not benefit from any advancement
> in the ofbiz community's ecommerce without starting
> over in your application.
>
> --- Kurt T Stam <[hidden email]> wrote:
>
> > Andrew this is exactly what I need, and your
> > comments exactly addresses
> > other concerns I had while I was doing what I was
> > doing. Thanks so much!
> >
> > --Kurt
> >
> > Andrew Sykes wrote:
> > > Kurt,
> > >
> > > I'd warn against modifying the ofbiz-component.xml
> > inside ecommerce.
> > >
> > > This is both unnecessary and means you're mixing
> > your code and OFBiz
> > > code which will lead to difficulties if you need
> > to do an upgrade.
> > >
> > > There is a directory specifically for bespoke
> > applications called "hot-
> > > deploy". You can use the ecommerce application as
> > a starting point for
> > > your new app. Simply copy the ecommerce app into
> > hot-deploy change the
> > > mount point, application name etc and you will
> > have a second
> > > application.
> > >
> > > You'll notice that the controller.xml for this new
> > app refers to
> > > artifacts in the original ecommerce app, for
> > example...
> > > <view-map name="ViewRequest" type="screen"
> > >
> >
> page="component://ecommerce/widget/RequestScreens.xml#ViewRequest"/>
> > >
> > > Note "component://ecommerce". You can therefore
> > remove everything from
> > > the new ecommerce directories that are simply
> > duplicates of the original
> > > ecommerce code. This means that you now will only
> > have copies of
> > > original ecommerce code where you have had to make
> > specific changes,
> > > let's say the new app was called "newecommerce",
> > you would reference
> > > like this...
> > > "component://newecommerce/....."
> > >
> > > Once you have your app setup, you can decide
> > whether you need to simply
> > > mount each app to a different place
> > > e.g. /newecommerce1 /newecommerce2 /newecommerce3
> > etc, which would be
> > > fine if you were using OFBiz in conjunction with
> > Apache, or if it's
> > > standalone, you might want to use the virtualhost
> > stuff.
> > >
> > > I hope that helps clarify.
> > >  
> >
> >
>
--
Kind Regards
Andrew Sykes <[hidden email]>
Sykes Development Ltd
http://www.sykesdevelopment.com

Reply | Threaded
Open this post in threaded view
|

Re: multiple websites configuration

Kurt T Stam-3
Yeah it seems both solutions are pretty much equivalent in the end.
Thanks guys, this is good stuff for me to get going on. I guess still
being new to this I will start with copying and deleting.

Andrew Sykes wrote:

> Kurt, Chris,
>
> Just to clarify, I was not suggesting you maintain an entire copy of
> ecommerce. My suggestion was to delete everything you didn't need and
> simply reference from the original ecommerce.
>
> More advanced users generally approach this the other way around, i.e.
> build an application and see what they can use from the codebase as they
> go, but if this is your first time, you might find it easier to start by
> making a copy and deleting things you aren't going to change. At least
> that way you start with a working application, which for a newbie is
> normally fairly important as you don't want to begin with a whole lot of
> exotic unfamiliar errors!
>
> Andrew
>
>
> On Thu, 2006-10-05 at 05:54 -0700, Chris Howe wrote:
>  
>> Instead of copying the ecommerce app, you may prefer
>> this approach
>> http://ofbizwiki.go-integral.com/Wiki.jsp?page=FAQ21
>>
>> The advantage of this approach is that it's likely you
>> only need to maintain the pieces that you modify.
>> With the approach that Andrew suggested, if you copy
>> all of the ecommerce files and change them to
>> newecommerce then you must maintain all of
>> newecommerce and will not benefit from any advancement
>> in the ofbiz community's ecommerce without starting
>> over in your application.
>>
>> --- Kurt T Stam <[hidden email]> wrote:
>>
>>    
>>> Andrew this is exactly what I need, and your
>>> comments exactly addresses
>>> other concerns I had while I was doing what I was
>>> doing. Thanks so much!
>>>
>>> --Kurt
>>>
>>> Andrew Sykes wrote:
>>>      
>>>> Kurt,
>>>>
>>>> I'd warn against modifying the ofbiz-component.xml
>>>>        
>>> inside ecommerce.
>>>      
>>>> This is both unnecessary and means you're mixing
>>>>        
>>> your code and OFBiz
>>>      
>>>> code which will lead to difficulties if you need
>>>>        
>>> to do an upgrade.
>>>      
>>>> There is a directory specifically for bespoke
>>>>        
>>> applications called "hot-
>>>      
>>>> deploy". You can use the ecommerce application as
>>>>        
>>> a starting point for
>>>      
>>>> your new app. Simply copy the ecommerce app into
>>>>        
>>> hot-deploy change the
>>>      
>>>> mount point, application name etc and you will
>>>>        
>>> have a second
>>>      
>>>> application.
>>>>
>>>> You'll notice that the controller.xml for this new
>>>>        
>>> app refers to
>>>      
>>>> artifacts in the original ecommerce app, for
>>>>        
>>> example...
>>>      
>>>> <view-map name="ViewRequest" type="screen"
>>>>
>>>>        
>> page="component://ecommerce/widget/RequestScreens.xml#ViewRequest"/>
>>    
>>>> Note "component://ecommerce". You can therefore
>>>>        
>>> remove everything from
>>>      
>>>> the new ecommerce directories that are simply
>>>>        
>>> duplicates of the original
>>>      
>>>> ecommerce code. This means that you now will only
>>>>        
>>> have copies of
>>>      
>>>> original ecommerce code where you have had to make
>>>>        
>>> specific changes,
>>>      
>>>> let's say the new app was called "newecommerce",
>>>>        
>>> you would reference
>>>      
>>>> like this...
>>>> "component://newecommerce/....."
>>>>
>>>> Once you have your app setup, you can decide
>>>>        
>>> whether you need to simply
>>>      
>>>> mount each app to a different place
>>>> e.g. /newecommerce1 /newecommerce2 /newecommerce3
>>>>        
>>> etc, which would be
>>>      
>>>> fine if you were using OFBiz in conjunction with
>>>>        
>>> Apache, or if it's
>>>      
>>>> standalone, you might want to use the virtualhost
>>>>        
>>> stuff.
>>>      
>>>> I hope that helps clarify.
>>>>  
>>>>        
>>>      

Reply | Threaded
Open this post in threaded view
|

Simple-method difficult question

Amit Shinde
In reply to this post by Andrew Sykes
Hello,
        I query twice in a simple-method. Each query returns a list. Is there a way
we can add these two lists and return the result as a single unified list?
        Has anyone done this? Any help will be appreciated. I will need to
implement a Java service otherwise.


Thanks in advance,
Amit Shinde


Reply | Threaded
Open this post in threaded view
|

Re: Simple-method difficult question

David E Jones-2

In general a single operation is never worth re-writing a simple-
method in Java... with that it is always easier to use the call-*-
method operations.

How is it that you want to combine the lists? There are tools (and  
example of use of these) in the simple-methods for various things  
here, including a merge sort type of thing, or a simple concatenation  
(with the list-to-list operation).

I guess I should take this opportunity to shamefully plug the best  
resource I'm aware of to help with the learning needed for this sort  
of development task: the Advanced Framework Training Materials from  
Undersun Consulting! (okay, well, from me...). These are available in  
the store at www.undersunconsulting.com (which is even running OFBiz,  
though it's an older version).

-David


On Oct 5, 2006, at 2:48 PM, Amit Shinde wrote:

> Hello,
> I query twice in a simple-method. Each query returns a list. Is  
> there a way
> we can add these two lists and return the result as a single  
> unified list?
> Has anyone done this? Any help will be appreciated. I will need to
> implement a Java service otherwise.
>
>
> Thanks in advance,
> Amit Shinde
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Simple-method difficult question

Hans Bakker
In reply to this post by Amit Shinde
Hi Amit,

hou about:
        <list-to-list list-name="xxxx" to-list-name="xxxx"/>
        <field-to-result field-name="xxxx"/>

--
Regards,
Hans Bakker
ANT Websystems Co.,Ltd (http://www.antwebsystems.com)

If you want to verify that this message really originates from
from the above person, download the public key from:
http://www.antwebsystems.com/hbakkerAntwebsystems.asc

On Thursday 05 October 2006 20:48, Amit Shinde wrote:
> Hello,
> I query twice in a simple-method. Each query returns a list. Is there a
> way we can add these two lists and return the result as a single unified
> list? Has anyone done this? Any help will be appreciated. I will need to
> implement a Java service otherwise.
>
>
> Thanks in advance,
> Amit Shinde

Reply | Threaded
Open this post in threaded view
|

RE: Simple-method difficult question

Amit Shinde
Thanks David and Hans,
        That worked! It wasnt difficult at all :)

Amit Shinde

-----Original Message-----
From: Hans Bakker [mailto:[hidden email]]
Sent: Thursday, October 05, 2006 7:35 PM
To: [hidden email]
Subject: Re: Simple-method difficult question


Hi Amit,

hou about:
        <list-to-list list-name="xxxx" to-list-name="xxxx"/>
        <field-to-result field-name="xxxx"/>

--
Regards,
Hans Bakker
ANT Websystems Co.,Ltd (http://www.antwebsystems.com)

If you want to verify that this message really originates from
from the above person, download the public key from:
http://www.antwebsystems.com/hbakkerAntwebsystems.asc

On Thursday 05 October 2006 20:48, Amit Shinde wrote:
> Hello,
> I query twice in a simple-method. Each query returns a list. Is there a
> way we can add these two lists and return the result as a single unified
> list? Has anyone done this? Any help will be appreciated. I will need to
> implement a Java service otherwise.
>
>
> Thanks in advance,
> Amit Shinde