Jason, thank you for this response. It was really helpful. However, I
know in the future I will not have to worry about web.xml and I promise
you I will be using maven. The point that no one seems to be paying
attention for, is that I do not want "ONLY" to use Cocoon. I really need
to understand how it works, what servlet starts when the request is
received, and yes the minimum configuration. The reason is, I need to
integrate cocoon and not to build a site with it. I have some
requirements to meet, and the end product that I am planing to use
Cocoon for will not be only through the web.
Basically I have to sync 2...n data bases through web services and for
each system, there's different DB schema and different DBMS.
The records may come from different sources (files, sockets, JMS...etc)
Well, all the answers I have got so far is about how easy it's to use
Cocoon and that I don't have to worry about anything. This is not the
way to go. I am not trying to impress my friends by how easy it's to
build a photo album or how nice my website looks. And I know Cocoon is
powerful. How am I gonna use it, and what do I need to worry about "is
my job".
All I need is to understand the minimum requirements. I think I know
what I need better than anyone else!
Your response was great, and I should have though about this from the
begging. I thought I can find a step by step tutorial some where.
However, I did a minimal built and tried to write a small program, but
was not able to get it to work. I think now my problem is in the sitemap
"the thing that everybody wants me to worry about".
I am getting an error:
No default type exists for 'pipeline' at
file:/opt/tomcat/webapps/mysite/sitemap.xmap:5:17
Now, what is this ?? Here's the contents of my sitemap:
1 <?xml version="1.0" encoding="iso-8859-1"?>
2
3 <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
4 <map:pipelines>
5 <map:pipeline>
6 <!-- respond to *.html requests with our docs processed
by doc2html.xsl -->
7 <map:match pattern="**/*.html">
8 <map:generate src="{1}.xml" />
9 <map:transform src="stylesheets/doc2html.xsl"
/>
10 <map:serialize type="html" />
11 </map:match>
12
13 </map:pipeline>
14 </map:pipelines>
15 </map:sitemap>
If you need any other info, let me know.
Jason Johnston wrote:
Mansour wrote:
This was not help at all.
What is the part that is hard to understand in my first question?
I asked about how to write a small hello world application from scratch
> and dump it in my tomcat/webapp. I Struts2, I include the jars in the
> WEB-INF/lib and configure web.xml and other files.
It sounds like you've got some preconceived expectations about how
Cocoon works. This is understandable if you've worked with other
frameworks like Struts, but you must understand that Cocoon is a very
different beast than most frameworks.
One of the nice things about Cocoon is that it is a complete framework
layer sitting above the J2EE/servlet environment, so it abstracts you
away from all the nitty-gritty stuff like configuring web.xml. Rather
than you having to go through the work of writing a web.xml and other
configuration files from scratch, you take the ones shipped with the
Cocoon distribution and use them as-is. You can of course customize
them to your heart's content, but in most cases (certainly for a Hello
World app) there is no need. You just take the pre-assembled webapp
that the build process produces, which has all the configuration and
jar files necessary for running Cocoon already in place, and start
right in with modifying the sitemap.xmap to build your app.
If using Cocoon 2.1.x, you run the build and it creates a
fully-functional webapp (unpacked war) under build/webapp/. You can
start right there modifying sitemap.xmap to create your Hello World
page. By default there are lots of samples included in the webapp
(including several Hello World type pages) which you can examine to
see how things work. Of course once you start creating a real app of
your own you won't want all those samples in there so you can exclude
them from the initial build.
If using Cocoon 2.2 (currently in pre-release) the process is a bit
different since it uses Maven to create "blocks", but actually makes
the process simpler and much cleaner to get a minimal working Cocoon
app up and running. You still don't have to worry at all about
web.xml or other low-level configurations. See the "Getting Started"
green box on the main cocoon.apache.org page for tutorials on that.
I hope this is of some help. You just have to remember that Cocoon is
very different than all other Java-based webapp frameworks out there,
and therefore often requires that you think in very different ways.
I'm sure some people don't like to do that, but many of us (me
included) much prefer the "Cocoon way of thinking" for its elegant and
robust concepts, and find it difficult going back.
Best of luck!
--Jason
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]