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 2.1 Dev install for Dummies - Windows 2000

How to setup Java SDK 1.4.1 + Tomcat 4.1.18 + Cocoon 2.1 Dev on a Windows 2000 PC.

I had some problems installing Cocoon 2.1 Dev on my Windows 2000 PC, so I made a short how-to for anyone interested.

I got it working thanks to previous messages in the list but took me a while to figure it so maybe this post will save time to somebody.

Assuming a "clean" Windows 2000 system and nothing related to Java installed.

Lets go!


Java SDK Setup

1) Download Java2 SDK Standard Edition v.1.4.1 File is j2sdk-1_4_1_01-windows-i586.exe from http://java.sun.com/j2se/1.4.1/download.html (Windows - SDK - All languages, including english)

2) Run j2sdk-1_4_1_01-windows-i586.exe SDK is now installed in c:\j2sdk1.4.1_01

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

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-LE-jdk14.zip from

http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.1.18/bin/

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

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

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

-> Tomcat installed, now you need Cocoon!


Cocoon Setup

7) Download WinCVS and Download Cocoon source.

That was pretty straightforward, following instructions available in http://xml.apache.org/cocoon/installing/index.html

Let's assume you have now full Cocoon source (HEAD) in c:\CVS\xml-cocoon2

8) Compile Cocoon using command interface (DOS!) and type build.bat -Dinclude.webapp.libs=yes webapp from directory c:\CVS\xml-cocoon2

9) Copy file cocoon.war from c:\CVS\xml-cocoon2\build\cocoon to c:\jakarta-tomcat-4.1.18-LE-jdk14\webapps

10) Run file shutdown.bat located at c:\jakarta-tomcat-4.1.18-LE-jdk14/bin to stop Tomcat

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

Cocoon.war file will expand in a new directory located at c:\jakarta-tomcat-4.1.18-LE-jdk14/webapps/cocoon

12) Stop Tomcat again (run file shutdown.bat)

13) VERY IMPORTANT!!!

You need to copy 3 files: xalan-2.4.1.jar, xercesImpl-2.1.0.jar and xml-apis.jar from C:\jakarta-tomcat-4.1.18-LE-jdk14\webapps\cocoon\WEB-INF\lib into directory c:\jakarta-tomcat-4.1.18-LE-jdk14/common/endorsed

Note: Before copying the 3 files, the directory "endorsed" was actually empty.

14) Run Tomcat again (run file startup.bat)

15) Direct your browser on http://localhost:8080/cocoon and ... it should be working.

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

Have fun!


Note: I updated the text, taking into account reader's comments on 1) valid Xerces jar filename (version number is now part of the file name). 2) need for explicit information that "endorsed" directory is empty after setting up on Tomcat (on JDK 1.4 at least).

Cocoon2.1DevSetupWin2000 (last edited 2009-09-20 23:42:57 by localhost)