forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Gardler <rgard...@apache.org>
Subject Re: multiple projects in single forrest instance
Date Thu, 16 Aug 2007 13:11:52 GMT
Tim Williams wrote:
> On 8/16/07, Ross Gardler <rgardler@apache.org> wrote:
>> kraftfeld wrote:
>>> Ross Gardler schrieb:
>>>> llamar burgess wrote:
>>>>> lo,
>>>>>
>>>>> working with forrest in "webapp" mode, i would like to set up
>>>>> multiple 'projects' served by a single forrest instance. I was not
>>>>> able to find too much information about this. I suppose it can be
>>>>> done, maybe someone could give me some hints how or where to find
>>>>> further information.
>>>> "forrest war" will generate a war file for you. Drop that into your
>>>> chosen container and off you go.
>>>>
>>>> BUT I've never tried it and expect there will be some issues with
>>>> configuring the path correctly when generating links. let us know what
>>>> problems you encounter and we'll help work through them (assuming you
>>>> searched the user archives before asking)
>>>>
>>>> Ross
>>>>
>>> hello ross,
>>>
>>> i think i made myself not quite clear, sorry. I already run an instance
>>> of forrest in a tomcat servlet container - works just fine by now.
>>> What i want is, that under this instance of forrest/cocoon various
>>> 'projects' are served. These projects should have theire own sitemap,
>>> skinconf, tab and site files while sharing cocoon xconf, jars etc..
>>>
>> That's exactly what I understood you to mean. Doing a "forrest war"
>> produces what you need (in theory, like I said, I have not personally
> tested this).

Re-reading this I see I did actaully misunderstand.

"forrest war" creates a complete instance of Cocoon + your content 
object as you seem to realise - sorry for the confusion.

Unfortunately, this is the only way to do it at present. Cocoon has the 
ability to mount sub-sitemaps. It would certainly be possible to do what 
you want to do, but the best place to get help is on the Cocoon lists 
(you could try our dev list first as we do have plenty of Cocoon people 
here). It would be great to work with you to implement this feature and 
put it in the next release.

However, I urge you to consider whether you really need to host 
dynamically. Forrest is designed to make static sites. There are very 
few out of the box features that require dynamic hosting.

> I too have not personally tested this, but I didn't think it was
> possible either.  I understood it to only create a single /xdocs
> directory so I'm not sure exactly how it could work?

[My misunderstanding above means this is less relevant now, nevertheless 
I will address this point]

Inside the server container we have:

/webapp/site1.war
/webapp/site2.war
/webapp/site3.war

which expand to:

/webapp/site1/sitemap.xmap
/webapp/site1/project/.. (this is where the xdocs and other stuff lives)
/webapp/site2/sitemap.xmap
/webapp/site2/project/.. (this is where the xdocs and other stuff lives)
/webapp/site3/sitemap.xmap
/webapp/site3/project/.. (this is where the xdocs and other stuff lives)

And are accessed with:

http://foo.org/site1/index.html
http://foo.org/site2/index.html
http://foo.org/site3/index.html

> Shucks, it's
> been a while, but I've always understood "single forrest
> instance->multiple projects" to be a limitation of the current system
> regardless of the "mode" its operating in?

The limitation is having sub-sites within a single content object where 
each site has a different configuration. The Dispatcher in whiteboard 
goes a long way to solving this problem of course.

There is no practical reason why a single servlet engine could not have 
multiple content objects, each with its own sitemap, skinconf, tab and 
site files. But as observed above this currently requires multiple 
instances of Cocoon to be running in your servlet engine.

Ross

Mime
View raw message