cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brett McLaughlin" <bmcla...@algx.net>
Subject Install Instructions on Tomcat
Date Tue, 07 Dec 1999 17:18:13 GMT
As promised, here are installation instructions on Tomcat, in
installing.xml.  Can someone commit these and make sure they generate all
right?  I wasn't able to test it, but the XML all looks good to me.  I did a
CVS diff, let me know if this should be in some other format.

Thanks,

Brett

Index: installing.xml
===================================================================
RCS file: /home/cvspublic/xml-cocoon/docs/installing.xml,v
retrieving revision 1.4
diff -r1.4 installing.xml
163c163,289
<    <p>Yet to be written! <em>Volunteers welcome!</em></p>
---
>    <p>
>     Tomcat has two basic methods of locating Java classes for the runtime
environment.
>     The first is the overall classpath that Tomcat uses to run, and this
is the
>     classpath provided to Java classes that use constructs such as
>     <code>Class.forName().newInstance()</code>.  The second classpath is
>     associated with a specific context, and is somewhat analagous to the
>     servlet zones used in Apache JServ.
>    </p>
>
>    <p>
>     Because the Cocoon framework utilizes <code>Class.forName()</code> and
other
>     dynamic instance handling techniques, the Cocoon classes need to have
its
>     classpath aware of the FOP, XSLP, and parser classes used within the
>     framework.  To do this, take the 3 jar files supplied with the Cocoon
>     distribution and put them in your
<source>&lt;Tomcat-Root&gt;/lib</source>
>     directory.  This is the standard location for Tomcat core libraries.
To
>     ensure that Tomcat will use these, you need to edit the Tomcat startup
file.
>     On Windows, this is <source>&lt;Tomcat-Root&gt;/tomcat.bat</source>
and on
>     Unix, this is <source>&lt;Tomcat-Root&gt;/tomcat.sh</source>.
 In this
>     file you must add the 3 included distribution jars to Tomcat's
classpath.
>     For Windows, using the default packages provided with Cocoon:
>    </p>
>
>    <source>set cocoonClasses=.\lib\xslp.19991017-fix.jar</source>
>    <source>set
cocoonClasses=.\lib\openxml.106-fix.jar;%cocoonClasses%</source>
>    <source>set cocoonClasses=.\lib\fop.0110.jar;%cocoonClasses%</source>
>    <source>set CLASSPATH=%appClassPath%;%sysJars%;%cocoonClasses%</source>
>
>    <p>
>     For Unix, using the default packages provided with Cocoon:
>    </p>
>
>    <source>cocoonClasses=${baseDir}/lib/xslp.19991017-fix.jar</source>
>
<source>cocoonClasses=.${baseDir}/lib/openxml.106-fix.jar:${cocoonClasses}</
source>
>
<source>cocoonClasses=${baseDir}/lib/fop.0110.jar:${cocoonClasses}</source>
>    <source>CLASSPATH=${appClassPath}:${sysJars}:${cocoonClasses}</source>
>
>    <p>
>     If you wish to use alternate parsers, such as IBM XML4J or Oracle, you
>     should use these instead of the jar files in the example.
>    </p>
>
>    <p>
>     <em>Note:</em> do not add the <code>Cocoon.jar</code> package
here
since
>     this might corrupt it's normal operation. Here, you should add all the
>     required packages <em>but</em> Cocoon itself.
>    </p>
>
>    <p>
>     Next you need to let the context you wish to use Cocoon in know about
Cocoon.
>     Although it is possible to use Cocoon across contexts, this is highly
>     discouraged; lots of instability and erratic caching behavior results.
>     For the context you wish to use Cocoon, in you need to make sure you
have a
>     directory <source>&lt;Path-to-Context&gt;/WEB-INF/lib</source>.
 This
>     directory is where jar files should be put for Tomcat to see for that
>     zone.  Place the Cocoon.jar file in this directory.  The next time
Tomcat
>     is started it should be able to see the files in the Cocoon
distribution.
>    </p>
>
>    <p>
>     If you would like to test the installation to this point, start Tomcat
and
>     reference the <code>org.apache.cocoon.Cocoon</code> class through the
context you have
>     it installed in.  For example, for a context called 'xml':
>    </p>
>
>
<source>http://localhost:8080/xml/servlet/org.apache.cocoon.Cocoon</source>
>
>    <p>
>     You should get a Cocoon generated error page, with an error message
about the
>     properties argument not being specified to Cocoon.  If you do not get
an error
>     page with a Cocoon header, you need to re-trace your steps.
>    </p>
>
>    <p>
>     Next you need to tell your context to let Cocoon know where to find
its
>     properties file, as well as to map Cocoon to XML document requests.
>     Make sure you have a <source>web.xml</source> file in your context's
>     <source>WEB-INF</source> directory.  This file specifies servlet
mappings
>     and initial arguments to servlets.  If you don't have this file, you
can copy
>     an example from <source>&lt;Tomcat-Root&gt;/examples/WEB-INF</source>
>     directory.  You should have the following entries in that file:
>    </p>
>
>    <source>
>     <![CDATA[
>     <servlet>
>         <servlet-name>
>             org.apache.cocoon.Cocoon
>         </servlet-name>
>         <servlet-class>
>             org.apache.cocoon.Cocoon
>         </servlet-class>
>         <init-param>
>             <param-name>
>                 properties
>             </param-name>
>             <param-value>
>
d:/java/servlet/tomcat/portal/WEB-INF/conf/cocoon.properties
>             </param-value>
>         </init-param>
>     </servlet>
>     <servlet-mapping>
>         <servlet-name>
>             org.apache.cocoon.Cocoon
>         </servlet-name>
>         <url-pattern>
>             *.xml
>         </url-pattern>
>     </servlet-mapping>
>     ]]>
>    </source>
>
>    <p>
>     You will need to replace the path to the Cocoon.properties file with
the actual
>     location of that file on your system.
>     Note that you should not need to change anything from the template
>     properties file found in the distribution, but you must edit it for
>     more complex operation. Please refer directly to the file that
contains
>     brief indications and comments on the different configurations, but
you
>     don't need to care about that at this point.
>    </p>
>
>    <p>
>     Everything should be configured fine. Restart Tomcat
>     and try accessing the samples contained in the distribution to see
>     Cocoon in action.
>    </p>



Mime
View raw message