aspose file tools*
The moose likes XML and Related Technologies and the fly likes Cocoon 2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Cocoon 2" Watch "Cocoon 2" New topic
Author

Cocoon 2

Frank Daly
Ranch Hand

Joined: Mar 31, 2000
Posts: 139
Hi
I have used Cocoon and have found it to be great. Cocoon 2 promises to look after every type of file e.g. .html xml etc in a site.
Has anyone any experience of using Cocoon 2 beta?
frank
jeremy crosbie
Greenhorn

Joined: Jun 20, 2001
Posts: 23
Hi, Frank!
One of the chapters I wrote in the book was on server-side presentation in which I used Cocoon 1. I find this to be the most promising of XML technologies available.
Cocoon2 is very different from Cocoon1. Where the goal of Cocoon1 was to separate content from how it is presented Cocoon2 desires the separation of content, logic, and presentation. The architecture revolves around the concept of a sitemap which defines all aspects of the site. There is a bit of a learning curve but going through the example site supplied with the Cocoon2 download and looking at the code helps it to all make sense.
Are there particular questions you have about Cocoon2?


------------------
Jeremy Crosbie
Co-Author of Professional Java XML


Jeremy Crosbie<BR>Co-Author of <A HREF="http://www.amazon.com/exec/obidos/ASIN/186100401X/ref=ase_electricporkchop" TARGET=_blank rel="nofollow">Professional Java XML</A>
Stanley Tan
Ranch Hand

Joined: May 17, 2001
Posts: 243
Sir Jeremy Crosbie,
While you are here at the Javaranch, I'll be trying to soak up as much information as I can. What is Cocoon? I have heard of it before (can't remember where) and the way you describe it, it sounds like the MVC Struts framework. Is it something similar to that?
Thank you!
Frank Daly
Ranch Hand

Joined: Mar 31, 2000
Posts: 139
Many thanks for your reply Jeremy.
I'm interested really in finding out if anyone is using Cocoon 2 and how they're getting on with it. I also want to know if some momentum has been lost on the project. Brett McLaughlin said to look out for Cocoon 2 in late 2000 but at this stage there is only a beta version available.
Jason Hunter in his book Java Servlet Programming reckons that at this time Cocoon is not ideal for interactive web sites. Do you think the new version will change this?
frank
jeremy crosbie
Greenhorn

Joined: Jun 20, 2001
Posts: 23
Simply put, Cocoon is a publishing framework, meaning it provides a way of publishing content in a manner free from how it is to be presented. How the content is presented is determine dynamically.
You can look at Cocoon and Struts in the same light as they are both frameworks for building web sites. However, Cocoon builds websites through the use of XML and its related technology where Struts is designed to be used for those applications using JSP and Servlets. This is really where I believe the similarities end.
Originally posted by Stanley Tan:
Sir Jeremy Crosbie,
While you are here at the Javaranch, I'll be trying to soak up as much information as I can. What is Cocoon? I have heard of it before (can't remember where) and the way you describe it, it sounds like the MVC Struts framework. Is it something similar to that?
Thank you!


------------------
Jeremy Crosbie
Co-Author of Professional Java XML
jeremy crosbie
Greenhorn

Joined: Jun 20, 2001
Posts: 23
Cocoon2 is in beta 2 right now. In all honesty, I have no problems with beta software released by Apache as the quality of work they put out is excellent. My "day job" is at a wireless company where we have to support any number of wireless devices. We are looking into using Cocoon2 in order to keep the development for new devices to a minimum using this framework.
As far as who is using it, not too many people are officially using Cocoon2. A list is kept of those who proudly boast using at http://xml.apache.org/cocoon2/livesites.html . A lot of Cocoon1 users but not too many Cocoon2 users, probably because of the beta stigma.
Cocoon1 is excellent for serving up static data as that was what it was originally designed to do. A lot was tried to make Cocoon work for a more interactive environment but when looking at the overall design the mechanisms for doing so seem like a way afterthought. Cocoon2 is a completely new design and has its sights set much higher. I think it will enjoy great success in all types of environments.
Originally posted by Frank Daly:
Many thanks for your reply Jeremy.
I'm interested really in finding out if anyone is using Cocoon 2 and how they're getting on with it. I also want to know if some momentum has been lost on the project. Brett McLaughlin said to look out for Cocoon 2 in late 2000 but at this stage there is only a beta version available.
Jason Hunter in his book Java Servlet Programming reckons that at this time Cocoon is not ideal for interactive web sites. Do you think the new version will change this?
frank


------------------
Jeremy Crosbie
Co-Author of Professional Java XML
Frank Daly
Ranch Hand

Joined: Mar 31, 2000
Posts: 139
Thanks again Jeremy
I'll give it a go.
frank
Robert, Assaad
Greenhorn

Joined: Aug 27, 2001
Posts: 12
How do you get started with Cocoon. What do you download and how do you set it up. Another question, is there and good materials out there. Do you have samples of how it works or maybe know where to find it. I need a lot of information and anything will do. Just started looking into it. Thanks.
jeremy crosbie
Greenhorn

Joined: Jun 20, 2001
Posts: 23
For starters go to http://xml.apache.org/cocoon2 and download the code. You will also need to run a Servlet container (like Tomcat) which you can download from http://jakarta.apache.org. Instructions for setting up Cocoon in Tomcat (as well as other popular servlet containers) is available at the Apache site.
Unfortunately materials for learning Cocoon2 are few. In my book I covered Cocoon1 but you really want to start using Cocoon2. One of the Cocoon contributors has started writing a document on developing using Cocoon2. You can get what he has started from http://www.mail-archive.com/cocoon-dev%40xml.apache.org/msg03583.html .
Originally posted by Robert, Assaad:
How do you get started with Cocoon. What do you download and how do you set it up. Another question, is there and good materials out there. Do you have samples of how it works or maybe know where to find it. I need a lot of information and anything will do. Just started looking into it. Thanks.


------------------
Jeremy Crosbie
Co-Author of Professional Java XML
Robert, Assaad
Greenhorn

Joined: Aug 27, 2001
Posts: 12
How do you install Cocoon 2. I have problems starting it. Could anyone help?
jeremy crosbie
Greenhorn

Joined: Jun 20, 2001
Posts: 23
Can you be more descriptive?
- What platform(jdk, OS, servlet container) are you using?
- Have you gone through the installation guides available on the Cocoon site?
- what error messages are you seeing?

------------------
Jeremy Crosbie
Co-Author of Professional Java XML
Robert, Assaad
Greenhorn

Joined: Aug 27, 2001
Posts: 12
My cocoon server does not want to work? Ant raison why?
I have windows 2000, and I'm running cocoon under ServletExec.
The path of my Cocoon is under C:\Working\projects\webapps\Cocoon
and my autoexec.bat contains the following:
<code>
set path=c:/jdk1.3.1/bin/;C:\jdk1.3.1\lib\tools.jar;
set Classpath=%path%;
set JAVA_HOME=c:/jdk1.3.1/;
</code>
This is my built.bat:
<code>
@echo on
:: -----------------------------------------------------------------------------
:: build.bat - Win32 Build Script for Apache Cocoon
::
:: $Id: build.bat,v 1.4.2.2 2001/06/26 07:27:30 cziegeler Exp $
:: -----------------------------------------------------------------------------
:: ----- Verify and Set Required Environment Variables -------------------------
if not "%JAVA_HOME%" == "" goto gotJavaHome
echo You must set JAVA_HOME to point at your Java Development Kit installation
goto cleanup
:gotJavaHome
if not "%ANT_HOME%" == "" goto gotAntHome
set ANT_HOME=.
:gotAntHome
:: ----- Set Up The Runtime Classpath ------------------------------------------
set CP=%JAVA_HOME%\lib\tools.jar;%ANT_HOME%\lib\ant_1_3.jar;%ANT_HOME%\lib\ant_1_3-optional.jar
for %%i in (.\lib\xerces*.jar) do call appendcp.bat %%i
for %%i in (.\lib\xalan*.jar) do call appendcp.bat %%i
:: ----- Execute The Requested Build -------------------------------------------
%JAVA_HOME%\bin\java.exe %ANT_OPTS% -classpath %CP% org.apache.tools.ant.Main -Djava.home=%JAVA_HOME% -Dant.home=%ANT_HOME% %1 %2 %3 %4 %5 %6 %7 %8 %9
:: ----- Cleanup the environment -----------------------------------------------
:cleanup
set CP=
</code>
Robert, Assaad
Greenhorn

Joined: Aug 27, 2001
Posts: 12
I get this error when I run my run.bat file. Could anyone help?
ERROR 99961 [COCOON] (main):Please, specify at least one starting URI.
Bernard Rossi
Greenhorn

Joined: Feb 20, 2001
Posts: 3
How does Cocoon fit in with WebSphere?
jeremy crosbie
Greenhorn

Joined: Jun 20, 2001
Posts: 23
Robert,
First of all, I don't know anything about ServletExec so I can't help you there. However there are instructions for installing Cocoon using ServletExec on the Cocoon site. It assumes that you are running ServletExec in-process with IIS so it may be necessary to tweak your configuration. In looking at what you describe, you may not have placed Cocoon in the right directory. According to the instructions on the Cocoon2 site:
Copy cocoon.war into C:\Program Files\New Atlanta\ServletExec ISAPI\webapps\default, creating the directory default if required.
If you haven't already, go to http://xml.apache.org/cocoon2/install.html for installation instructions.
------------------
Jeremy Crosbie
Co-Author of Professional Java XML
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Cocoon 2