

































|
Cocoon requires the following systems to be already installed in your
system:
- Java Virtual Machine
A Java 1.1 or greater compatible virtual machine must be present for both
command line and servlet type usage of Cocoon. Note that all servlet engines
require a JVM to run so if you are already using servlets you already have
one installed.
- Servlet Engine
A Servlet 2.x compliant servlet engine must be present in order to support
servlet operation and dynamic request handling. Note that this requirement
is optional for command line operation.
|
Cocoon is a publishing framework and was designed to be highly modular to
allow users to choose their preferred implementation for the required
component and to allow better and faster parallel development.
Previous releases of Cocoon forced you to download all the basic required
packages for the installation, but this generated lots of problems for
lack of synch between the projects and the complexity of the operation.
For this reason, Cocoon now ships with all the required packages,
a sort of a simple distribution to make things easier for you. We apologize
for the increased size of the distribution, but we think this will be
worthwhile even for users with low bandwidth.
In the /bin directory you'll find the cocoon.jar
jar package that contains the Cocoon binary files, while the /lib
directory contains all the libraries required for complete Cocoon operation.
While these packages may not be the most up-to-date versions, they are
guaranteed and tested to work properly with Cocoon so, we suggest that you
use them. Note, however, that they were all redistributed untouched from
their original distributions.
If you use Java 1.2.x, you also have to treat the file
[jdk_home]/lib/tools.jar as another Cocoon component and include
this into your classpath. This package contains the java compiler that
is required for Cocoon page compilation.
 |
The Ant and Stylebook packages are only used in the build system and
are not used by Cocoon at run-time. So you can safely
ignore them in the installation.
|
|
Being Cocoon a servlet, you should be able to install it on every compliant
servlet engine by associating the "org.apache.cocoon.Cocoon" servlet
with the requests you want it to handle. In order to do this, there is no
standard way, so we try to provide detailed information for the most used
servlet systems.
 |  |  |  | Installing Cocoon on Apache JServ |  |  |  |  |
First thing to do is to make sure that Cocoon and all the needed components
(as explained in the previous section) are visible. This implies adding
this to the servlet engine classpath by adding a bunch of classpath lines
to your jserv.properties file for each jar package.
 |  |  |  | wrapper.classpath=[path-to-jar]/[jar-name].jar |  |  |  |  |
Here is an example:
 |  |  |  |
wrapper.classpath=/usr/local/java/jdk/lib/tools.jar
wrapper.classpath=/usr/local/java/cocoon/bin/cocoon.jar
wrapper.classpath=/usr/local/java/cocoon/lib/xerces.jar
wrapper.classpath=/usr/local/java/cocoon/lib/xalan.jar
wrapper.classpath=/usr/local/java/cocoon/lib/fop.jar
...
|  |  |  |  |
 |
The ./bin/cocoon.jar package must be added to the
servlet engine classpath in order for the XSP subsystem to work correctly.
We perfectly understand this as a limitation to Cocoon flexibility, and
we are working hard to make it possible for multiple cocoon instances to
reside in the same JVM, unfortunately some limitations in Java 1.1 make
this impossible at this time.
|
 |
JServ is a Servlet 2.0 compliant servlet engine and will not work if you
place the Servlet_2.2.jar in its classpath. So ignore the servlet_2.2.jar
package that is shipped with Cocoon if you use Jserv.
|
At this point, you must set the Cocoon configurations. To do this, you
must choose the servlet zone(s) where you want Cocoon to reside.
If you don't know what a servlet zone is, open the
zone.properties file.
To configure Cocoon, you must pass the cocoon.properties
file location to the servlet by adding the following line to the servlet zone:
 |  |  |  | servlet.org.apache.cocoon.Cocoon.initArgs=properties=[path-to-cocoon]/bin/cocoon.properties |  |  |  |  |
Note that you should not need to change anything from the template
properties file found in the distribution (under /conf/ ),
but you must edit it for more complex operation. Please refer directly to
the file that contains breaf indications and comments on the different
configurations, but you don't need to care about that at this point.
Now your cocoon servlet is properly configured, but you should tell Apache
to direct any call to an XML file (or any other file you want Cocoon to
process) to the Cocoon servlet. To do this, you should add the following line
to your jserv.conf file:
 |  |  |  | Action cocoon /servlet/org.apache.cocoon.Cocoon
AddHandler cocoon xml |  |  |  |  |
where xml is the file extention you want Cocoon to handle
and /servlet/ is the mount point of your servlet zone (and the
above is the standard name for servlet mapping for Apache JServ).
You need to make sure that you have the following line uncommented in your
httpd.conf or Apache will not be able to start:
 |  |  |  | LoadModule action_module /path/to/mod_actions.so |  |  |  |  |
Restart both Apache and Apache JServ and try accessing the Cocoon status page:
 |  |  |  | http://localhost/Cocoon.xml |  |  |  |  |
Cocoon will show you how it's configured.
If the page above is working, make the samples contained in the distribution
(under ./samples ) visible from your web server (by either
copying the files under yout htdocs directory, or by making
at alias for the sample directory) and call ./samples/index.xml
to see Cocoon in action.
 |
For any problem, please go to the FAQ list before submitting a bug
report or a request for help on the mail lists. Thank you.
|
|
 |  |  |  | Installing Cocoon on Apache Tomcat |  |  |  |  |
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
Class.forName().newInstance() . The second classpath is
associated with a specific context, and is somewhat analagous to the
servlet zones used in Apache JServ (see section above).
Because the Cocoon framework utilizes Class.forName() and other
dynamic instance handling techniques, the Cocoon classes need to have its
classpath aware of the component classes used within the framework. To do
this, take all the required components (see above) and put them in your
<Tomcat-Root>/lib 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 <Tomcat-Root>/tomcat.bat and on
Unix, this is <Tomcat-Root>/tomcat.sh. In this
file you must add all the component jar files to Tomcat's classpath.
 |
the cocoon.jar
package should be added to the servlet engine classpath as any other
required package (as shown above).
|
Next you need to tell your context where Cocoon can find it's properties
file, as well as to map Cocoon to XML document requests.
Make sure you have a web.xml file in your context's
WEB-INF directory (look in src/WEB-INF/ to find a
template web.xml). This file specifies servlet mappings
and initial arguments to servlets and looks like this:
 |  |  |  |
<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>
[path-to-cocoon.properties]/cocoon.properties
</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>org.apache.cocoon.Cocoon</servlet-name>
<url-pattern>*.xml</url-pattern>
</servlet-mapping>
|  |  |  |  |
Make sure you replaced the path to the Cocoon.properties file with the
location of that file on your system,
relative to the context root. Even if you start the
filename with a / it will still be relative to the context root.
 |
Because Cocoon now (since version 1.7.3) uses getResource() in the
Servlet API to read cocoon.properties, and has different instances for
each servlet context, you need to put a copy of cocoon.properties in all
of your servlet contexts that use Cocoon. (It is recommended to put it
in the context's WEB-INF directory, or a password-protected directory,
to prevent anyone from being able to read it over the web.)
However, you cannot use symbolic links on Unix to point
to a file outside of the current context, because Tomcat does not allow
it for security reasons.
|
 |
the cocoon.properties file must be referenced
with relative paths in WEB-INF/web.xml , otherwise, Cocoon
won't be able to locate it's properties and won't be able to start.
|
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.
At this point, you should check if your system matches the global
considerations about Cocoon properties. Usually, you might want to give
the installation a try as it is and then read again that section if
something goes wrong. Most installations don't need any changes to
be operational.
If you have upgraded Cocoon from an older version and Cocoon won't
initialize, either ensure that
you are using the latest cocoon.properties - or, if you are have some
non-standard properties in cocoon.properties which you need to keep,
refer to the latest cocoon.properties to find out what changes need to
be made, if any.
Everything should now be configured fine. Restart both Apache and Tomcat
and try accessing the samples contained in the distribution to see
Cocoon in action or the /Cocoon.xml page for Cocoon internal
status.
 |
Tomcat 3.0 has a bug that prevents Cocoon operation, please download
a later version.
|
 |
Due to DOM level1 and DOM level2 incompatibilities, make sure that
xerces.jar is located before xml.jar
since Xerces contains DOM2 (which is needed by Cocoon) while ProjectX
contains DOM1 (which will generate runtime exceptions with Cocoon).
|
|
 |  |  |  | Installing Cocoon on BEA WebLogic |  |  |  |  |
|
Cocoon has been reported to be working on these systems:
Operating System
|
Web Server
|
Servlet Engine
|
JVM
|
RedHat Linux 6.0
|
Apache 1.3.9
|
Apache JServ 1.0
|
IBM JDK 1.1.8
|
RedHat Linux 6.0
|
Apache 1.3.9
|
Apache JServ 1.1b3
|
IBM JDK 1.1.8
|
RedHat Linux 6.0
|
Apache 1.3.9
|
Apache JServ 1.0
|
Blackdown JDK 1.2pre2
|
RedHat Linux 6.1
|
Apache 1.3.9
|
JRun 2.3.3
|
IBM JRE 1.1.8
|
RedHat Linux 6.1 (i686)
|
Apache 1.3.11
|
Apache JServ 1.1
|
Sun JDK 1.2.2
|
RedHat Linux 6.1 (i686)
|
Apache 1.3.11 + mod_ssl 2.5.0
|
Apache JServ 1.1
|
IBM JDK 1.1.8
|
Windows 98
|
Apache 1.3.9
|
Apache JServ 1.0
|
Sun JDK 1.2.2
|
Windows 98
|
Apache 1.3.9
|
Apache JServ 1.0
|
IBM JDK 1.1.7
|
Windows 98
|
Apache 1.3.9
|
Apache JServ 1.1b3
|
Sun JDK 1.2.2
|
Windows 98
|
Apache 1.3.9
|
Apache JServ 1.1b3
|
IBM JDK 1.1.7
|
Windows 98
|
MS Personal Web Server
|
ServletExec 2.2
|
Sun JDK 1.2.1
|
Windows NT 4.0
|
IIS 4.0
|
ServletExec 2.2
|
Sun JDK 1.2.1
|
Windows NT 4.0
|
IIS 4.0
|
JRun 2.3.3
|
Sun JDK 1.2.1
|
Windows NT 4.0
|
Apache 1.3.9
|
JRun 2.3.3
|
Sun JDK 1.2.2
|
Windows NT 4.0
|
Apache Jakarta Tomcat 3.1 Milestone 1
|
Sun JDK 1.2.2
|
MacOS 8.6
|
WebSTAR 4.0
|
JRun 2.3
|
MrJ 2.1.4
|
MacOS 8.6
|
WebSTAR 4.0
|
ServletExec 2.1
|
Mrj 2.1.4
|
MacOS 8.6
|
Quid Pro Quo 2.1.3
|
ServletExec 2.2
|
Mrj 2.1.4
|
SunOS Netria 5.6
|
Apache 1.3.9
|
Apache JServ 1.1b3
|
Sun JDK 1.1.7
|
FreeBSD 3.4
|
Apache 1.3.9
|
Apache JServ 1.0
|
Blackdown JDK 1.1.8
|
SCO OpenServer 5
|
WebLogic 4.5.1
|
SCO JDK 1.1.7A
|
MacOS 8.5+
|
Resin 1.1b
|
MRJ 2.2
|
FreeBSD 3.4-STABLE with linux_base-6.1 for linux-emulation
|
Jetty Java HTTP Server v2.3.3
|
Blackdown jdk-1.2.2-RC4-linux-i386-glibc
|
SuSE 6.3 Linux
|
Apache 1.3.9
|
Apache JServ 1.1
|
Sun JDK 1.2.2
|
OS/2 Warp 4 FP 12
|
Gefion Software LiteWebServer
|
IBM JDK 1.1.8
|
SGI IRIX 6.5.7
|
Apache 1.3.12
|
Apache JServ 1.1
|
Sun JDK 1.2.1 (SGI)
|
Microsoft Windows 2000 Professional
|
Apache 1.3.12
|
Apache JServ 1.1
|
Sun JDK 1.2.2
|
Windows NT 4.0 Sp6a
|
Apache 1.3.11
|
Apache JServ 1.1
|
Sun JDK 1.2.2
|
Please, submit your feedback on the cocoon user mail list (nowhere else!) if
you were able to install Cocoon on a different combination not listed above.
Thanks.
|
|
|