File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes how to use cocoon Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to use cocoon" Watch "how to use cocoon" New topic
Author

how to use cocoon

prabhu palanisamy
Greenhorn

Joined: Oct 30, 2000
Posts: 27
i'm at present working in xml and xsl.
i downloaded cocoon , a technology used apached which integrates
all.i could'nt able to build,does any body have installed cocoon
and working on it.i'll be very happy if i get response.
thanx in advance,
bye
Frank Daly
Ranch Hand

Joined: Mar 31, 2000
Posts: 139
hi prabhu,
I managed to get cocoon 1.8 working with tomcat 3.1, but without apache, on an NT machine. It's tricky to complete the installation because the documentation isn't very good.
Follow the installation instructions on the cocoon site, install.html noting a couple of mistakes.
When editing the web.xml file 'cocoon-properties' should be 'cocoon.properties'.
the parser.jar should be after some other jar file in the CLASSPATH, if renamed to zparser.jar, cocoon should work.
hope this helps
frank
Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5782
You might want to checkout the online chapter Web Publishing frameworks from O'Reilly's Java and XML book. This chapter is dedicated to Apache's Cocoon and has detailed instructions about installation procedures.
Good luck,
Ajith


Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
sean mcilwain
Greenhorn

Joined: Jan 08, 2001
Posts: 10
I was wondering what are the differences between the anticipated cocoon 2.0 and the most recent version (1.8)? Is it just a question of stability?
Frank Daly
Ranch Hand

Joined: Mar 31, 2000
Posts: 139
Sean,
goto http://xml.apache.org/cocoon/cocoon2.html
frank
Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5782
We use cocoon in our production environment. It has worked quite well for us. If you have any specific queries I will be glad to help you!
Cocoon installation comes with all the tools and documents you will need to make it work. It is not simple , but not very hard either.
------------------
Ajith Kallambella M.
Sun Certified Programmer for the Java2 Platform.
Frank Daly
Ranch Hand

Joined: Mar 31, 2000
Posts: 139
Hi Ajith,
Thanks for your offer of help. If you use databases, could you give an example or instructions using cocoon to generate an xml file from a query?
tia
frank
Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5782
I forgot to add this -
Since XSLT processing is Extremely CPU intensive, XML/Cocoon based applications need powerful machines to run. Using precompiled libraries is one way of reducing latency but this migration path might soon leave you with no option, but to upgrade your production servers.
------------------
Ajith Kallambella M.
Sun Certified Programmer for the Java2 Platform.
Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5782
Frank,
We use the Producer-Processor pattern supported by Cocoon( it is also called the "Reactor" pattern.) that allows us to plug-in dynamic XML producers and Processors.
Our producers use EJBs to communicate with the DB. We wrote a small framework to transform the resultset into an XML string. Producers make use of these XML strings to build the XML document that gets rendered or processed.
This is not a very efficient way of doing it, but it works. We will very soon move to XML databinding and/or making use of XML-enabled databases such as Oracle 8i.
Hope that helps!
------------------
Ajith Kallambella M.
Sun Certified Programmer for the Java2 Platform.
Frank Daly
Ranch Hand

Joined: Mar 31, 2000
Posts: 139
Thanks Ajith
It looks like there is a way using an esql logicsheet to query a database. If i figure it out, i'll send a post.
frank
Viji Bharat
Ranch Hand

Joined: Sep 18, 2000
Posts: 101
All:
I downloaded Cocoon 1.8.2 from Apache and installed it on my PC. I followed the installation instructions and I tried to access the XML. I have the following questions:
1. I have integrated Tomcat with PWS on NT and when I try to access any of the servlets using http://hostname... (without the port #), it works fine.
2. However, when I try to access http://<<hostname>>/<<XML files>>, I get a page not found error. If I use http://<<hostname>>:8080/<<XML>>, it works fine. What change should I make and where so that I don't have to use port # when trying to access XML?
3. Even using port # 8080, the XML pages displayed do not seem to be correct. For eg. I tried accessing the XML samples/docbook/book-docbook.xml and I get the following page
n navy red blue black ()
The error message I can see in tomcat window is this :
IO Exception in R( /cocoon + /samples/docbook/book-docbook.xml + null) Connection aborted by peer - socket write error.
What is wrong? Can someone offer me suggestions?
Thanks
Viji


[This message has been edited by Viji Bharat (edited January 31, 2001).]
Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5782
I feel this question is more targetted towards the Servlet audience. I am going to copy this thread to Servlets forum just to increase the chances of getting this issue addressed!
Good luck,

------------------
Ajith Kallambella M.
Sun Certified Programmer for the Java�2 Platform.
[This message has been edited by Ajith Kallambella (edited January 31, 2001).]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to use cocoon