cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric de Groot <e...@ericdegroot.com>
Subject Basic cocoon app for newbies
Date Fri, 05 Apr 2002 19:16:49 GMT
After struggling for a few days trying to figure cocoon out, this is what I
came up with as a basic starter cocoon application.  It¹s the same basic
structure as the cocoon webapp, but only including the required stuff for
cocoon-2.0.2.jar ( also, I just took all the jars from lib, you can pick and
choose if you only use certain components.. ).  This is an ant project, so
if you don¹t use ant... everything in /src will go to
/tomcat/webapps/myapp.cocoon/WEB-INF/classes, everything in /web will go to
/tomcat/webapps/myapp.cocoon/, etc..  Read below for a few details on the
conf files.

myapp.cocoon/
myapp.cocoon/build.xml
myapp.cocoon/docs
myapp.cocoon/src
myapp.cocoon/src/CatalogManager.properties
myapp.cocoon/web
myapp.cocoon/web/sitemap.xmap
myapp.cocoon/web/stylesheets
myapp.cocoon/web/stylesheets/system
myapp.cocoon/web/stylesheets/system/directory2html.xsl
myapp.cocoon/web/stylesheets/system/error2html.xsl
myapp.cocoon/web/stylesheets/system/profile2html.xsl
myapp.cocoon/web/stylesheets/system/status2html.xsl
myapp.cocoon/web/test.html
myapp.cocoon/web/test.xml
myapp.cocoon/web/test.xsl
myapp.cocoon/web/WEB-INF
myapp.cocoon/web/WEB-INF/cocoon.xconf
myapp.cocoon/web/WEB-INF/lib
myapp.cocoon/web/WEB-INF/lib/avalon-excalibur-4.1.jar
myapp.cocoon/web/WEB-INF/lib/avalon-excalibur-scratchpad-20020212.jar
myapp.cocoon/web/WEB-INF/lib/avalon-framework-4.1.2.jar
myapp.cocoon/web/WEB-INF/lib/batik-all-1.5b1.jar
myapp.cocoon/web/WEB-INF/lib/bsf-2.2.jar
myapp.cocoon/web/WEB-INF/lib/castor-0.9.3.9-xml.jar
myapp.cocoon/web/WEB-INF/lib/cocoon-2.0.2.jar
myapp.cocoon/web/WEB-INF/lib/cocoon-scratchpad.jar
myapp.cocoon/web/WEB-INF/lib/commons-collections-1.0.jar
myapp.cocoon/web/WEB-INF/lib/commons-httpclient-20011012.jar
myapp.cocoon/web/WEB-INF/lib/commons-JXPath-20020320.jar
myapp.cocoon/web/WEB-INF/lib/commons-logging-1.0.jar
myapp.cocoon/web/WEB-INF/lib/deli-0.50.jar
myapp.cocoon/web/WEB-INF/lib/fop-0.20.3rc.jar
myapp.cocoon/web/WEB-INF/lib/hsqldb-1.61.jar
myapp.cocoon/web/WEB-INF/lib/jakarta-poi-1.5-dev-20020315.jar
myapp.cocoon/web/WEB-INF/lib/jakarta-regexp-1.2.jar
myapp.cocoon/web/WEB-INF/lib/jena-1.3.0.jar
myapp.cocoon/web/WEB-INF/lib/jimi-1.0.jar
myapp.cocoon/web/WEB-INF/lib/jisp_1_0_2.jar
myapp.cocoon/web/WEB-INF/lib/jstyle.jar
myapp.cocoon/web/WEB-INF/lib/jtidy-04aug2000r7-dev.jar
myapp.cocoon/web/WEB-INF/lib/logkit-1.0.1.jar
myapp.cocoon/web/WEB-INF/lib/lucene-1.2-rc2.jar
myapp.cocoon/web/WEB-INF/lib/maybeupload_1-0-5pre3.jar
myapp.cocoon/web/WEB-INF/lib/pizza-1.1.jar
myapp.cocoon/web/WEB-INF/lib/rdffilter.jar
myapp.cocoon/web/WEB-INF/lib/resolver-20020130.jar
myapp.cocoon/web/WEB-INF/lib/rhino-1.5r3.jar
myapp.cocoon/web/WEB-INF/lib/velocity-1.2.jar
myapp.cocoon/web/WEB-INF/lib/xalan-2.3.1.jar
myapp.cocoon/web/WEB-INF/lib/xercesImpl-2.0.0.jar
myapp.cocoon/web/WEB-INF/lib/xml-apis.jar
myapp.cocoon/web/WEB-INF/lib/xmldb-api-20011111.jar
myapp.cocoon/web/WEB-INF/lib/xt-19991105.jar
myapp.cocoon/web/WEB-INF/logkit.xconf
myapp.cocoon/web/WEB-INF/logs
myapp.cocoon/web/WEB-INF/web.xml

CatalogManager.properties: No changes made, just steal it from an expanded
cocoon.war.

sitemap.xmap: Removed all the sun example junk.  Removed all views,
resources, action-sets and pipelines.  Left everything in components as was.
Added my own test pipeline so the bottom of my sitemap looks like:

...
 </map:components>

<!-- =========================== Views ===================================
-->

 <map:views/>

<!-- =========================== Resources =================================
-->

 <map:resources/>

<!-- ========================== Action sets ================================
-->

 <map:action-sets/>

<!-- =========================== Pipelines =================================
-->

 <map:pipelines>
  <map:pipeline>   
    <map:match pattern="">
      <map:read mime-type="text/html" src="test.html"/>
    </map:match>

    <map:match pattern="test">
     <map:generate src="test.xml"/>
     <map:transform src="test.xsl"/>
     <map:serialize/>
    </map:match>
  </map:pipeline>  
 </map:pipelines>

</map:sitemap><!-- end of file -->

cocoon.xconf: Removed all the sun example junk.  Removed all the hsqldb
(used by the examples) stuff.

logkit.xconf: Left as it was in cocoon.war.

web.xml: Left basically as it was in cocoon.war, you just have to make sure
your cocoon stuff gets routed through the Cocoon2 servlet (which is in
cocoon-2.02.jar), and everything you can route to your own servlets and
jsps.

Deploy all that to tomcat and you should be in business.

It would be nice there were 2 cocoon distributions, a bare bones ³I mean
business² version as a base for deploying new and existing applications, and
a ³Cocoon 2?  Yeah, that movie sucked, the first one was way better² full of
examples version for the newbie.  The examples, once you don¹t need them,
infect the directory structure and all the conf files like a disease.  It
takes a lot of work to remove it all.

-Eric de Groot
mailto:eric@ericdegroot.com


Mime
View raw message