Cocoon Configuration FAQs



Getting Started

Configure C2


How do I setup my own .roles file?

In cocoon.xconf you can specify your my.roles file as follows:

   <cocoon version="2.0" user-roles="/WEB-INF/my.roles">

if you are using Tomcat 4. For other versions, skip the leading slash of the URI.

And create a new file my.roles in WEB-INF directory with

<?xml version="1.0"?>
  <role name="org.apache.cocoon.components.jsp.JSPEngine"
Where do I setup LogKit in Cocoon?

1. {cocoon}/WEB-INF/logkit.xconf:

Please refer to the Avalon LogKit Documentation

2. {cocoon}/WEB-INF/web.xml:

Here you can change following paramters:

  • logkit-config: This parameter indicates the configuration file of the LogKit management
  • servlet-logger: This parameter indicates the category id of the logger from the LogKit configuration used by the CocoonServlet.
  • cocoon-logger: This parameter indicates the category id of the logger from the LogKit management configuration for the Cocoon engine. This logger is used for all components described in the cocoon.xconf and sitemap.xmap file not having specified a logger with the logger="..." attribute in the component configuration file.
  • log-level: This parameter indicates the log level to use throughout startup of the system. As soon as the logkit.xconf the setting of the logkit.xconf configuration is used instead! Only for startup and if the logkit.xconf is not readable/available this log level is of importance.

NoteSee inline comments in these files for further information!

Learn more about LogKit configuration by downloading the free chapter, A User's Look at the Cocoon architecture, from Langham and Ziegeler's Cocoon: Building XML Applications available at the New Riders web site.

How can I change the physical location of my upload directory?

Look in web.xml file located in <your-webapp>/WEB-INF. There you will find the following snippet:


The above snippet shows the default path to the upload directory, specified within <param-value>. Replace it with a different path to your upload directory, relative to the context path of the servlet.

How can I solve 'Too many open files' errors when I try to create a search index for my site?

Either reduce the number of tags in your documant, by filtering it with xslt in your search view.

Or, increase the limit on the number of files your opperating system allows you to have open simultaneously, in the shell you launch the servlet engine in.

example (Linux, bash shell): ulimit 2048

example (MacOSX, tcsh shell): limit descriptors 2048

How can I add my FAQ to this document?

Follow the instructions found in How-To Author an FAQ.

How can I suggest improvements to existing FAQs?

Given the rapid pace of change with Cocoon, many individual FAQs quickly become out-of-date and confusing to new users. If you have the relevant knowledge, please consider updating other FAQs on this page for technical errors. If you see a few typos, please consider fixing them too. Follow the instructions found in How-To Author an FAQ.

Copyright © 1999-2002 The Apache Software Foundation. All Rights Reserved.