| <?xml version="1.0" encoding="UTF-8"?> |
| <!DOCTYPE faqs PUBLIC "-//APACHE//DTD FAQ V1.0//EN" "../dtd/faq-v10.dtd"> |
| |
| <faqs title="Cocoon Configuration FAQs"> |
| |
| <faq> |
| <question> |
| How do I setup my own .roles file? |
| </question> |
| <answer> |
| <p> |
| In cocoon.xconf you can specify your my.roles file as follows: |
| </p> |
| |
| <source><![CDATA[ |
| ... |
| <cocoon version="2.0" user-roles="/WEB-INF/my.roles"> |
| ... |
| ]]></source> |
| |
| <p> |
| if you are using Tomcat 4. For other versions, skip the leading |
| slash of the URI. |
| </p> |
| |
| <p> |
| And create a new file my.roles in WEB-INF directory with |
| </p> |
| |
| <source><![CDATA[ |
| <?xml version="1.0"?> |
| <role-list> |
| <role name="org.apache.cocoon.components.jsp.JSPEngine" |
| shorthand="jsp-engine" |
| default-class="org.apache.cocoon.components.jsp.JSPEngineImplWLS"/> |
| </role-list> |
| ]]></source> |
| |
| </answer> |
| </faq> |
| |
| <faq> |
| <question> |
| Where do I setup LogKit in Cocoon? |
| </question> |
| <answer> |
| <p>1. <code>{cocoon}/WEB-INF/logkit.xconf</code>:</p> |
| <p>Please refer to the |
| <link href="http://avalon.apache.org/logkit/index.html">Avalon LogKit Documentation</link></p> |
| <p>2. <code>{cocoon}/WEB-INF/web.xml</code>:</p> |
| <p>Here you can change following paramters:</p> |
| <ul> |
| <li><code>logkit-config</code>: This parameter indicates the configuration |
| file of the LogKit management</li> |
| <li><code>servlet-logger</code>: This parameter indicates the category id |
| of the logger from the LogKit configuration used by the CocoonServlet.</li> |
| <li><code>cocoon-logger</code>: 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.</li> |
| <li><code>log-level</code>: 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.</li> |
| </ul> |
| <note>See inline comments in these files for further information!</note> |
| <p> |
| Learn more about LogKit configuration by downloading the free chapter, <link href="http://www.newriders.com/books/product.asp?product_id={C3C05052-BE3B-4E06-A60A-13FB40AF58F6}" >A User's Look at the Cocoon architecture,</link> from Langham and Ziegeler's <em>Cocoon: Building XML Applications</em> available at the New Riders web site. |
| </p> |
| </answer> |
| </faq> |
| |
| <faq> |
| <question> |
| How can I change the physical location of my upload directory? |
| </question> |
| <answer> |
| <p>Look in web.xml file located in <your-webapp>/WEB-INF. There you will find the following snippet:</p> |
| <source><![CDATA[ |
| <init-param> |
| <param-name>upload-directory</param-name> |
| <param-value>/WEB-INF/work/upload-dir</param-value> |
| </init-param> |
| ]]></source> |
| <p> |
| 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. |
| </p> |
| </answer> |
| </faq> |
| |
| <faq> |
| <question> |
| How can I solve 'Too many open files' errors when I try to create a search index for my site? |
| </question> |
| <answer> |
| <p>Either reduce the number of tags in your documant, by filtering it with xslt in your search view.</p> |
| <p>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.</p> |
| <p>example (Linux, bash shell): ulimit 2048</p> |
| <p>example (MacOSX, tcsh shell): limit descriptors 2048</p> |
| </answer> |
| </faq> |
| |
| </faqs> |