Warning: many pages on this wiki imply that a servlet container must be installed before running Cocoon, this is wrong - see NoServletContainerRequired. A basic installation of Cocoon for test or development purposes can be very simple.

Cocoon Release 2.04 install for Dummies - Windows 2000

How to setup Cocoon Release 2.0.4 + Tomcat 4.1.18 + Java SDK 1.3.1 on a Windows 2000 PC.

An absolute "no brainer" how-to instal Cocoon 2.0.4 on a Windows 2000 system without Java and Tomcat previously installed.

Note 1: Java SDK 1.3.1 has been chosen because of today's limited availability of Java SDK 1.4 on servlet hosting & aplication servers.

Note 2: Idea here is to update this document each time a new C2 version is released.


Java SDK Setup

1) Download Java2 SDK Standard Edition v.1.3.1

Enter http://java.sun.com/j2se/1.3/download.html and click DOWNLOAD entry corresponding to "Windows - (All languages)" and column "SDK". Accept license and then click on file j2sdk-1_3_1_XX-windows-i586.exe to download it (33 Mb)

Note: Last 2 digits of file correspond to valid Java SDK Minor Version (currently 06)

2) Run j2sdk-1_3_1_XX-windows-i586.exe SDK is now installed in c:\j2sdk1.3.1_XX

3) In the Windows Control Panel, go to System / Advanced Properties and create a system variable JAVA_HOME with value "c:\j2sdk1.3.1_XX" (without quotes).

Change XX with the subrelease number corresponding to the file you downloaded! For instance "c:\j2sdk1.3.1_06"

Now your system knows where the run-time environment (Java) is located.

-> Java Software Development Kit installed, now you need the Servlet Engine.


Tomcat Setup

4) Download Tomcat 4.1.18

File is jakarta-tomcat-4.1.18.zip from http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.1.18/bin/ (8.1 Mb)

5) Unzip everything into directory c:\jakarta-tomcat-4.1.18 (extract using folder names)

6) Run file startup.bat located at c:\jakarta-tomcat-4.1.18/bin

Enter http://localhost:8080 in your browser and check that Tomcat (the servlet engine) is running (run some examples at http://localhost:8080/examples/servlets/).

(If this doesn't work, and you're running on a LAN, try disabling the proxy server for local addresses (in IE, go to Tools, Options, the Connections tab, the LAN settings button, and tick "Bypass proxy server for local addresses".)

-> Tomcat installed, now you need Cocoon!


Cocoon Setup

7) Download Cocoon Release 2.04

File is cocoon-2.0.4-bin.zip from http://xml.apache.org/cocoon/dist/ (19 Mb)

On the right of the screen, it should say "< Latest binary distribution for JDK 1.2/1.3"

8) Unzip file cocoon-2.0.4-bin.zip into directory c:\cocoon-2.0.4 (extract using folder names)

9) Run file shutdown.bat located at c:\jakarta-tomcat-4.1.17/bin to stop Tomcat. => Application Server is stopped.

10) Copy file c:\cocoon-2.0.4\cocoon.war to c:\jakarta-tomcat-4.1.17\webapps

Note: The WAR extension corresponds to a Web ARchive File that includes the files to be deployed in the Application Server. Actually it's a zipped file, so you can change the file extension to look at its content before deploying.

11) Run file startup.bat located at c:\jakarta-tomcat-4.1.17/bin to startup Tomcat again.

Cocoon.war file will expand in a new directory located at c:\jakarta-tomcat-4.1.17/webapps/cocoon (takes a few seconds).

Note: Of course it's possible to deploy Web Applications without stopping the Application Server. But let's start the easy way.

12) Direct your browser on http://localhost:8080/cocoon and you should see the Cocoon screen that says "It seems you got me running (smile)".

Also check samples at http://localhost:8080/cocoon/samples/

Have fun!

  • No labels