You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by zzkumar <ku...@gmail.com> on 2009/06/26 08:21:25 UTC

Stand alone Cocoon

Hi All,

I am new to Cocoon. We are planning to use Cocoon for report generation (XML
+ excel template passed through Cocoon = Excel file with values filled in).

I am able to generate the report when I deploy the cocoon as a web app.
Now the issue is, I want to integrate cocoon into my existing webapp. By
integrating I mean, I should use the web.xml of my current web application
and not the one from cocoon. i.e. every request should go through my old
web.xml.
and when I say generate report, it should invoke methods from Cocoon and
generate reports.

For ex. I want to have a method like : public Object generateReport(String
xlsPath, String excelTemplatePath) and this method should invoke classes
from Cocoon, generate report and return the report.

Please let me if this is possible. Also please direct me to some documents,
links on this.

thank you in advance.
Regards,
Kumar.D
-- 
View this message in context: http://www.nabble.com/Stand-alone-Cocoon-tp24215561p24215561.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Stand alone Cocoon

Posted by warrell harries <wa...@googlemail.com>.
I haven't looked at version 3.0 but I have done just what you describe using
2.1x and the CLI technique. Have you looked at the process for packaging
Coccon as an offline application. There is some recent comment on the
mailing list about it and thre is plenty of material on the web. Enjoy - it
is very impressive when you get it working :)

2009/6/26 zzkumar <ku...@gmail.com>

>
> Hi All,
>
> I am new to Cocoon. We are planning to use Cocoon for report generation
> (XML
> + excel template passed through Cocoon = Excel file with values filled in).
>
> I am able to generate the report when I deploy the cocoon as a web app.
> Now the issue is, I want to integrate cocoon into my existing webapp. By
> integrating I mean, I should use the web.xml of my current web application
> and not the one from cocoon. i.e. every request should go through my old
> web.xml.
> and when I say generate report, it should invoke methods from Cocoon and
> generate reports.
>
> For ex. I want to have a method like : public Object generateReport(String
> xlsPath, String excelTemplatePath) and this method should invoke classes
> from Cocoon, generate report and return the report.
>
> Please let me if this is possible. Also please direct me to some documents,
> links on this.
>
> thank you in advance.
> Regards,
> Kumar.D
> --
> View this message in context:
> http://www.nabble.com/Stand-alone-Cocoon-tp24215561p24215561.html
> Sent from the Cocoon - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>

Re: Stand alone Cocoon

Posted by Steven Dolg <st...@indoqa.com>.
zzkumar schrieb:
> Hi All,
>
> I am new to Cocoon. We are planning to use Cocoon for report generation (XML
> + excel template passed through Cocoon = Excel file with values filled in).
>
> I am able to generate the report when I deploy the cocoon as a web app.
> Now the issue is, I want to integrate cocoon into my existing webapp. By
> integrating I mean, I should use the web.xml of my current web application
> and not the one from cocoon. i.e. every request should go through my old
> web.xml.
> and when I say generate report, it should invoke methods from Cocoon and
> generate reports.
>
> For ex. I want to have a method like : public Object generateReport(String
> xlsPath, String excelTemplatePath) and this method should invoke classes
> from Cocoon, generate report and return the report.
>   

One thing I forgot to mention:
What you describe looks almost like a helper class we created in Cocoon 
3.0 
http://cocoon.apache.org/3.0/apidocs/org/apache/cocoon/pipeline/util/TransformationUtils.html

Basically it builds a Pipeline, adds the required components, applies 
the parameters  and executes this all.
It's like a one-stop-shop for the most common XSLT things you can come 
across.

This class is also a nice example for the Pipeline API itself and how to 
use it for building your own ready-to-use transformations.
http://svn.apache.org/repos/asf/cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/util/TransformationUtils.java

(However, keep in mind that this is trunk, so it has all the nice 
generics, packaging, etc.)
> Please let me if this is possible. Also please direct me to some documents,
> links on this.
>
> thank you in advance.
> Regards,
> Kumar.D
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Stand alone Cocoon

Posted by warrell harries <wa...@googlemail.com>.
Small is beautiful :) I have a lot to be modest about....

2009/6/26 Ellis Pritchard <el...@mobi1.co.uk>

> Could you just use your working cocoon application as a web-service? e.g.
> Use commons http to call it? Nice scalability implications...
>
> Ellis.
>
>
> On 26 Jun 2009, at 09:38, Steven Dolg <st...@indoqa.com> wrote:
>
>  zzkumar schrieb:
>>
>>> Hi All,
>>>
>> Hi,
>>
>>  I am new to Cocoon. We are planning to use Cocoon for report generation
>>> (XML
>>> + excel template passed through Cocoon = Excel file with values filled
>>> in).
>>>
>>> I am able to generate the report when I deploy the cocoon as a web app.
>>> Now the issue is, I want to integrate cocoon into my existing webapp. By
>>> integrating I mean, I should use the web.xml of my current web
>>> application
>>> and not the one from cocoon. i.e. every request should go through my old
>>> web.xml.
>>> and when I say generate report, it should invoke methods from Cocoon and
>>> generate reports.
>>>
>>> For ex. I want to have a method like : public Object
>>> generateReport(String
>>> xlsPath, String excelTemplatePath) and this method should invoke classes
>>> from Cocoon, generate report and return the report.
>>>
>>> Please let me if this is possible. Also please direct me to some
>>> documents,
>>> links on this.
>>>
>>>
>> I am strictly speaking about Cocoon 3.0 here:
>>
>> Yes this is entirely possible. Actually it was one of the goals when
>> designing the new version.
>> And there are people who did exactly what you described above (having a
>> web application and using Cocoon  inside it, just like you would use a
>> templating engine or an O/R-Mapper)
>>
>> However there's a catch: It is still an alpha version.
>>
>> So the basic question is: can you live with an alpha version?
>> If the answer is NO, then Cocoon 3.0 is not what you want - you might as
>> well stop reading this now (I think it will be months before this goes into
>> any king of beta phase).
>>
>>
>> If the answer is YES, then Cocoon 3.0 can probably solve a lot of your
>> problems rather easily.
>> The basic principles are the same as those of Cocoon 2.x and it's rather
>> easy to create new pipeline components or modify behaviour the way you
>> want/need.
>> ("Our" students from the TU Vienna do it all the time, even if it's not
>> part of their project - apparently they think it's fun)
>>
>>
>> Cocoon 3.0 provides an API to create pipelines programmatically and use
>> them basically everywhere you have Java available.
>> You can even use the sitemap on top of that if you want to and still use
>> Coccon inside your own application like any other non-web framework.
>>
>>
>> The system is already used in some commercial applications and AFAIK,
>> Apache Sling is looking at integrating it too. (Again it's the pipeline API
>> that makes certain things possible and interesting).
>> We are continuously working on it, although this may not be very visible
>> or prominent at times.
>>
>> Documentation is another weak point right now. So there isn't much to
>> point you to.
>> The general idea about Cocoon 3.0 is sketched out here:
>> http://cocoon.apache.org/3.0/ and a (slightly) more detailed overview is
>> ready here http://cocoon.apache.org/3.0/features.html.
>> The documentation is for version 3.0.0-alpha-1.
>>
>> The current trunk contains a lot of changes and extensions and thanks to
>> the feedback we got, this version is more consistent, easier to use, and
>> more reliable.
>> IMO a new release should follow rather shortly (1 - 2 months) but maybe
>> I'm a bit optimistic on that.
>>
>>
>> I am not sure whether this is possible at all with Cocoon 2.x.
>> I guess some of the "older" guys have to answer that.
>>
>>
>> I hope this makes sense to you.
>>
>> Cheers,
>> Steven
>>
>>  thank you in advance.
>>> Regards,
>>> Kumar.D
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>

Re: Stand alone Cocoon

Posted by Ellis Pritchard <el...@mobi1.co.uk>.
Could you just use your working cocoon application as a web-service?  
e.g. Use commons http to call it? Nice scalability implications...

Ellis.

On 26 Jun 2009, at 09:38, Steven Dolg <st...@indoqa.com> wrote:

> zzkumar schrieb:
>> Hi All,
> Hi,
>
>> I am new to Cocoon. We are planning to use Cocoon for report  
>> generation (XML
>> + excel template passed through Cocoon = Excel file with values  
>> filled in).
>>
>> I am able to generate the report when I deploy the cocoon as a web  
>> app.
>> Now the issue is, I want to integrate cocoon into my existing  
>> webapp. By
>> integrating I mean, I should use the web.xml of my current web  
>> application
>> and not the one from cocoon. i.e. every request should go through  
>> my old
>> web.xml.
>> and when I say generate report, it should invoke methods from  
>> Cocoon and
>> generate reports.
>>
>> For ex. I want to have a method like : public Object generateReport 
>> (String
>> xlsPath, String excelTemplatePath) and this method should invoke  
>> classes
>> from Cocoon, generate report and return the report.
>>
>> Please let me if this is possible. Also please direct me to some  
>> documents,
>> links on this.
>>
>
> I am strictly speaking about Cocoon 3.0 here:
>
> Yes this is entirely possible. Actually it was one of the goals when  
> designing the new version.
> And there are people who did exactly what you described above  
> (having a web application and using Cocoon  inside it, just like you  
> would use a templating engine or an O/R-Mapper)
>
> However there's a catch: It is still an alpha version.
>
> So the basic question is: can you live with an alpha version?
> If the answer is NO, then Cocoon 3.0 is not what you want - you  
> might as well stop reading this now (I think it will be months  
> before this goes into any king of beta phase).
>
>
> If the answer is YES, then Cocoon 3.0 can probably solve a lot of  
> your problems rather easily.
> The basic principles are the same as those of Cocoon 2.x and it's  
> rather easy to create new pipeline components or modify behaviour  
> the way you want/need.
> ("Our" students from the TU Vienna do it all the time, even if it's  
> not part of their project - apparently they think it's fun)
>
>
> Cocoon 3.0 provides an API to create pipelines programmatically and  
> use them basically everywhere you have Java available.
> You can even use the sitemap on top of that if you want to and still  
> use Coccon inside your own application like any other non-web  
> framework.
>
>
> The system is already used in some commercial applications and  
> AFAIK, Apache Sling is looking at integrating it too. (Again it's  
> the pipeline API that makes certain things possible and interesting).
> We are continuously working on it, although this may not be very  
> visible or prominent at times.
>
> Documentation is another weak point right now. So there isn't much  
> to point you to.
> The general idea about Cocoon 3.0 is sketched out here: http://cocoon.apache.org/3.0/ 
>  and a (slightly) more detailed overview is ready here http://cocoon.apache.org/3.0/features.html 
> .
> The documentation is for version 3.0.0-alpha-1.
>
> The current trunk contains a lot of changes and extensions and  
> thanks to the feedback we got, this version is more consistent,  
> easier to use, and more reliable.
> IMO a new release should follow rather shortly (1 - 2 months) but  
> maybe I'm a bit optimistic on that.
>
>
> I am not sure whether this is possible at all with Cocoon 2.x.
> I guess some of the "older" guys have to answer that.
>
>
> I hope this makes sense to you.
>
> Cheers,
> Steven
>
>> thank you in advance.
>> Regards,
>> Kumar.D
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Stand alone Cocoon

Posted by Steven Dolg <st...@indoqa.com>.
zzkumar schrieb:
> Hi All,
Hi,

> I am new to Cocoon. We are planning to use Cocoon for report generation (XML
> + excel template passed through Cocoon = Excel file with values filled in).
>
> I am able to generate the report when I deploy the cocoon as a web app.
> Now the issue is, I want to integrate cocoon into my existing webapp. By
> integrating I mean, I should use the web.xml of my current web application
> and not the one from cocoon. i.e. every request should go through my old
> web.xml.
> and when I say generate report, it should invoke methods from Cocoon and
> generate reports.
>
> For ex. I want to have a method like : public Object generateReport(String
> xlsPath, String excelTemplatePath) and this method should invoke classes
> from Cocoon, generate report and return the report.
>
> Please let me if this is possible. Also please direct me to some documents,
> links on this.
>   

I am strictly speaking about Cocoon 3.0 here:

Yes this is entirely possible. Actually it was one of the goals when 
designing the new version.
And there are people who did exactly what you described above (having a 
web application and using Cocoon  inside it, just like you would use a 
templating engine or an O/R-Mapper)

However there's a catch: It is still an alpha version.

So the basic question is: can you live with an alpha version?
If the answer is NO, then Cocoon 3.0 is not what you want - you might as 
well stop reading this now (I think it will be months before this goes 
into any king of beta phase).


If the answer is YES, then Cocoon 3.0 can probably solve a lot of your 
problems rather easily.
The basic principles are the same as those of Cocoon 2.x and it's rather 
easy to create new pipeline components or modify behaviour the way you 
want/need.
("Our" students from the TU Vienna do it all the time, even if it's not 
part of their project - apparently they think it's fun)


Cocoon 3.0 provides an API to create pipelines programmatically and use 
them basically everywhere you have Java available.
You can even use the sitemap on top of that if you want to and still use 
Coccon inside your own application like any other non-web framework.


The system is already used in some commercial applications and AFAIK, 
Apache Sling is looking at integrating it too. (Again it's the pipeline 
API that makes certain things possible and interesting).
We are continuously working on it, although this may not be very visible 
or prominent at times.

Documentation is another weak point right now. So there isn't much to 
point you to.
The general idea about Cocoon 3.0 is sketched out here: 
http://cocoon.apache.org/3.0/ and a (slightly) more detailed overview is 
ready here http://cocoon.apache.org/3.0/features.html.
The documentation is for version 3.0.0-alpha-1.

The current trunk contains a lot of changes and extensions and thanks to 
the feedback we got, this version is more consistent, easier to use, and 
more reliable.
IMO a new release should follow rather shortly (1 - 2 months) but maybe 
I'm a bit optimistic on that.


I am not sure whether this is possible at all with Cocoon 2.x.
I guess some of the "older" guys have to answer that.


I hope this makes sense to you.

Cheers,
Steven

> thank you in advance.
> Regards,
> Kumar.D
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org