This page will serve as a note repository as well as a how to for ourselves.
2006-6-13
Local cocoon installation here.
2006-6-12
In order to add a custom http 404 error page to your cocoon deployment, take a page out of the sitemap.xmap that come with cocoon.
We used the one in the cocoon-2.1.9\build\webapp directory.
From there we added the custom error page by altering the select when statement to our fitting.
<map:when test="not-found">
<map:generate src="xml/sitewide.xml"/>
<map:transform src="stylesheets/error.xsl">
<map:parameter name="contextPath" value="{request:contextPath}"/>
</map:transform>
<map:serialize status-code="404"/>
</map:when>
2006-6-11
In order to get the application deployed as a true cocoon app, and not have it as a sub sitemap, we just
incorporated the cocoon system into the build process.
From eclipse we just run the ant script and have the following.
The second fileset is to grab the system stylsheets that come with cocoon.
They are helpful when doing some predefined things like error handling.
<property name="cocoon-home" value="C:/cocoon-2.1.9/build/webapp" />
<target name="war" depends="init">
<war destfile="dist/xmp.war" webxml="${cocoon-home}/WEB-INF/web.xml">
<webinf dir="${cocoon-home}/WEB-INF" />
<fileset dir=".">
<include name="**/*" />
<exclude name="doc/**/*" />
<exclude name="dist/**/*" />
<exclude name="buld/**/*" />
</fileset>
<fileset dir="${cocoon-home}">
<include name="**/stylesheets/**/*"/>
</fileset>
</war>
</target>
If you use the above solution to include cocoon as it comes out of the box, you might run into redeploy issues with tomcat. Since cocoon likes to write files to WEB-INF/logs it will not close out the file pointer when redeploying. As a convenience, we have a light install that will just move over the most changed content, the sitemap.xmap, our xsl pages, our xml pages and other custom content. This works for the default installation of cocoon just fine.
<target name="install-local-light">
<copy todir="${catalina.local.home}/webapps/xmp">
<fileset dir=".">
<include name="**/*" />
<exclude name="doc/**/*" />
<exclude name="dist/**/*" />
<exclude name="buld/**/*" />
</fileset>
</copy>
</target>
2006-6-10
The firm was busy with other items, including launching a cocoon site. Notes will follow in the days to come.
2006-4-29
Building war is as simple as "build.bat war", the war file will land in build/cocoon/cocoon.war
Building. In building 2.1.9, I foudn that you should not involke the ant script directly.
One needs to run bulid.bat from the root directory, then...
BUILD SUCCESSFUL Total time: 12 minutes 56 seconds C:\cocoon-2.1.9>