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]

Reply via email to