You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Vadim Gritsenko <va...@reverycodes.com> on 2008/03/17 16:15:13 UTC

Re: Embedding Cocoon (was: Re: [GSoC_2008] Project ideas)

On Mar 17, 2008, at 11:15 AM, Grzegorz Kossakowski wrote:

> Vadim Gritsenko pisze:
>> External HTTP crawler is not a replacement for cocoon embedding  
>> APIs (which what our CLI was, allows you to embed cocoon and use it  
>> from within another java application, together with simple main()  
>> wrapper).
>
> I believe that similar effect could be achieved by application  
> imitating DispatcherServlet from SSF. If application wants to embed  
> Cocoon it should do basic initialization that DispatcherServlet does  
> and call SitemapServlet.forward() method. Of course that means the  
> application would need to implement few classes imitating  
> ServletContext, Request, Respone but I don't it's that hard...
>
> WDYT?


Yep. That's exactly how it was done -- see:
http://svn.apache.org/repos/asf/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/environment/commandline/


Vadim

Re: Embedding Cocoon (was: Re: [GSoC_2008] Project ideas)

Posted by Vadim Gritsenko <va...@reverycodes.com>.
On Mar 18, 2008, at 4:11 AM, Thorsten Scherler wrote:

> I am not sure whether you are aware of
> http://svn.apache.org/viewvc/labs/droids/trunk/

You probably missed it, it was mentioned just few emails up this same  
thread -
http://markmail.org/message/53mbfx56ubpx5and

Vadim

Re: Embedding Cocoon (was: Re: [GSoC_2008] Project ideas)

Posted by Thorsten Scherler <th...@juntadeandalucia.es>.
On Mon, 2008-03-17 at 11:15 -0400, Vadim Gritsenko wrote:
> On Mar 17, 2008, at 11:15 AM, Grzegorz Kossakowski wrote:
> 
> > Vadim Gritsenko pisze:
> >> External HTTP crawler is not a replacement for cocoon embedding  
> >> APIs (which what our CLI was, allows you to embed cocoon and use it  
> >> from within another java application, together with simple main()  
> >> wrapper).
> >
> > I believe that similar effect could be achieved by application  
> > imitating DispatcherServlet from SSF. If application wants to embed  
> > Cocoon it should do basic initialization that DispatcherServlet does  
> > and call SitemapServlet.forward() method. Of course that means the  
> > application would need to implement few classes imitating  
> > ServletContext, Request, Respone but I don't it's that hard...
> >
> > WDYT?
> 
> 
> Yep. That's exactly how it was done -- see:
> http://svn.apache.org/repos/asf/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/environment/commandline/

I am not sure whether you are aware of 
http://svn.apache.org/viewvc/labs/droids/trunk/
http://people.apache.org/~thorsten/droids/index.html

I am planing to hit the incubator in a couple of days with the
httpcomponents project sponsoring the move. Droids is 100% java/spring
based, so it will be very easy to integrate it in cocoon. 

Like stated in the droids documentation I started the lab because the
CLI is gone in 2.2.. IMO the only that is missing to be a full
replacement of the former CLI is to support the whole configuration
file. This however should be very straight forward to implement.

salu2
-- 
Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions