dims 01/07/23 07:58:29
Modified: xdocs Tag: cocoon_20_branch faq.xml
Log:
Added FAQ's for
- Integration with Apache Server.
- xvfb for headless display's
Revision Changes Path
No revision
No revision
1.1.1.1.2.10 +114 -0 xml-cocoon2/xdocs/faq.xml
Index: faq.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/xdocs/faq.xml,v
retrieving revision 1.1.1.1.2.9
retrieving revision 1.1.1.1.2.10
diff -u -r1.1.1.1.2.9 -r1.1.1.1.2.10
--- faq.xml 2001/07/19 18:43:49 1.1.1.1.2.9
+++ faq.xml 2001/07/23 14:58:29 1.1.1.1.2.10
@@ -466,4 +466,118 @@
</p>
</answer>
</faq>
+<faq>
+ <question>
+ How do i integrate Apache Server and @docname@?
+ </question>
+ <answer>
+ <p>
+ You need to use mod_jk. Add the following line to
<code>%APACHE_HOME%\conf\httpd.conf</code>
+ </p>
+ <source>
+ JkMount /cocoon/* ajp12
+ </source>
+ <p>
+ along with other directives that are already listed in mod_jk.conf-auto
+ in the tomcat/conf directory. The the above directives can be added at the
+ end of httpd.conf.
+ </p>
+ </answer>
+</faq>
+<faq>
+ <question>
+ How do i hide "cocoon" in the URL's once i integrate using mod_jk as shown
above?
+ </question>
+ <answer>
+ <p>
+ Basically to use <code>http://your.server.org/Foo/welcome</code> (as an
example) instead of
+ <code>http://your.server.org/cocoon/Foo/welcome</code>. You need the following
two modifications:
+ </p>
+ <p>
+ Step #1: Add the following lies to to httpd.conf.
+ </p>
+ <source>
+<![CDATA[
+RewriteEngine On
+RewriteLog "/var/log/rewrite.log"
+RewriteLogLevel 0
+RewriteRule ^/Foo /cocoon/Foo/ [R]
+RewriteRule ^/Foo(.*) /cocoon/Foo$1 [R]
+]]>
+ </source>
+ <p>
+ The file rewrite.log does not have to be located in <code>/var/log</code>. For
+ instance, under Windows NT other locations may be appropriate. The
+ RewriteLogLevel should be set 3 for debug purposes. The third line is
+ essentially a redirect, so that Foo becomee <code>/cocoon/Foo/</code> with the
+ trailing <code>/</code>, without it the request would not map onto
+ </p>
+ <source>
+<![CDATA[
+<map:match pattern="">
+ <map:redirect-to uri="welcome" />
+</map:match>
+]]>
+ </source>
+ <p>
+ when you I request <code>http://your.server.org/Foo</code>.
+
+ Finally, the last RewriteRule could depend on the local settings.
+ The original suggestion by Luca was a single line entry (that replaces
+ both RewriteRules above) according to:
+ </p>
+ <source>
+<![CDATA[
+RewriteRule Foo/(.*) /cocoon/Foo/$1 [PT]
+]]>
+ </source>
+ <note>
+ This did not work in my case (Slackware Linux with Apache1.3,
+ tomcat3.2.2, @docname@). Again, these RewriteRules may vary somewhat
+ depending on the local settings. You may have to experiment a bit.
+ </note>
+ <p>
+ Step #2: Add to the sitemap.xmap in the cocoon directory.
+ </p>
+ <source>
+<![CDATA[
+<map:pipeline>
+ <map:match pattern="Foo/**">
+ <map:mount uri-prefix="Fru" src="/www/Foo/"
+ check-reload="yes" reload-method="synchron"/>
+ </map:match>
+</map:pipeline>
+]]>
+ </source>
+ <p>
+ Here, <code>/www/Foo</code> is a some directory on the local file system where
the
+ xml, xsp, .., files of the application Foo live.
+ </p>
+ <note>
+ The src attribute may have to include "file://"
+ </note>
+ </answer>
+</faq>
+
+<faq>
+ <question>
+ How can I run @docname@ without X11. Why is a Display needed?
+ </question>
+ <answer>
+ <p>
+ An Xserver is needed due to the batik library fop uses. batik uses
+ java's graphics code, which in turn requires the Xserver.
+ If you don't have an xserver on your system, and can't set the DISPLAY
+ variable to one, then try out xvfb. xvfb gives you an 'in-memory'
+ xserver, which doesn't require any display hardware to run.
+ </p>
+ <source>
+<![CDATA[
+$> Xvfb :1 -screen 0 800x600x8 &
+$> export DISPLAY=:1
+$> $TOMCAT_HOME/bin/startup.sh -f server.xml
+]]>
+ </source>
+ </answer>
+</faq>
</faqs>
----------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]