Cocoon is a servlet-based application.
Just install a cocoon distribution into your WEB-INF directory of your WAR file:
Copy all the distribution files/directory into the WEB-INF directory.
Make sure that the 'sitemap' element points to your sitemap.xmap file in the WEB-INF directory:
<sitemap check-reload="yes" config="resource://org/apache/cocoon/components/treeprocessor/treeprocessor-builtins.xml" file="context://WEB-INF/sitemap.xmap" logger="sitemap"/>
Setup your sitemap.xmap file in WEB-INF (see Cocoon documentation).
Cocoon has many, many extra "kits" that provide optional features.
Everything is about 31MB.
I've trimmed this down to about 15MB.