- Warning : This is long and verbose !
+ Warning : This is long and verbose ! The steps and file listings should be read in the order given i.e top
+ down to bottom.
@@ -326,7 +327,7 @@
And again the really important step, copy the cocoon.properties file into the
new gogo directory.
-
+
Kill Jakarta-Tomcat.
Kill Apache.
@@ -350,12 +351,42 @@
as long as cocoon.properties is also in there (which it should be or else you won't be able
to see the internal Cocoon.xml status page) then it should all work from that ROOT directory.
+
In order to avoid Jakarta-Tomcat having to serve up the XML files on port 8080, the
+ C:\Program_Files\jakarta-tomcat\conf\tomcat-apache.conf file can be modified by adding
+ the line AddHandler jserv-servlet .xml. (Refer to the start of the listing for
+ C:\Program_Files\jakarta-tomcat\conf\tomcat-apache-cocoon.conf below to see where the line should be.)
+
+
After starting/stopping Jakarta-Tomcat and Apache in the same manner as described above you should now
+ be able to access XML files without specifying port 8080. e.g http://shaggy.blimp.au/samples/index.xml.
+ Note : if your browser cannot find the file then make sure your C:\Program_Files\jakarta-tomcat\conf\server.xml
+ file has alias directives for the samples directory. See text below and code segment.
+
+
Note: You must be careful when making modifications to C:\Program_Files\jakarta-tomcat\conf\tomcat-apache.conf
+ because this file is automatically generated each time Jakarta-Tomcat starts and will therefore overwrite any
+ modifications you have made. To complicate matters, the contents of C:\Program_Files\jakarta-tomcat\conf\server.xml,
+ where you might specify some context "AutoSetup actions", determines some of the content of
+ C:\Program_Files\jakarta-tomcat\conf\tomcat-apache.conf, so simply making a once off copy of
+ C:\Program_Files\jakarta-tomcat\conf\tomcat-apache.conf and adding the AddHandler jserv-servlet .xml
+ line and referencing the copied .conf file with the include statement in
+ C:\Program_Files\Apache Group\Apache\conf\httpd.conf may also lead to problems.
+
+
My solution was to eliminate all context AutoSetup actions in C:\Program_Files\jakarta-tomcat\conf\server.xml, then copy
+ C:\Program_Files\jakarta-tomcat\conf\tomcat-apache.conf to C:\Program_Files\jakarta-tomcat\conf\tomcat-apache-cocoon.conf, then
+ add the line AddHandler jserv-servlet .xml to C:\Program_Files\jakarta-tomcat\conf\tomcat-apache-cocoon.conf, then
+ modify the include statement in C:\Program_Files\Apache Group\Apache\conf\httpd.conf to read
+ include C:/Program_Files/jakarta-tomcat/conf/tomcat-apache-cocoon.conf. This method places the onus on the webmaster
+ to make sure the copied and modified version of C:\Program_Files\jakarta-tomcat\conf\tomcat-apache-cocoon.conf is always
+ up to date. See code segment below.
+
+
I have listed my simplied C:\Program_Files\jakarta-tomcat\conf\server.xml file. Note the references to my test gogo
+ directory in this file which are needed in order to get the hello-page.xml example working without using port 8080 in the
+ address. See code segment below.
-
Well, thats how I got it to work
+
Well, thats how I got it to work.
Works for me and I hope for you too.
-
No worries !
+
Sorry for all the completely specfied file and directory paths, but it should at least be unambiguous. No worries !
Being bit of a XML/XSL/JAVA etc novice, here are some hints that I now know but it would have
- made life a lot easier if I knew them before I attempted Cocoon/Jakarta-Tomcat/Apache etc..
+
Being bit of a XML/XSL/JAVA etc novice, here are some hints that I now know but it would have
+ made life a lot easier if I knew them before I attempted Cocoon/Jakarta-Tomcat/Apache etc..
+
Don't be fooled...use the refresh button on the web browser when fiddling about. The cache is
your enemy in the early days !
@@ -510,8 +705,161 @@
Understanding how Cocoon finds the cocoon.properties file is the key.
-
No worries !
+
In order to make the starting and stopping of Apache/Jakarta-Tomcat/Cocoon a bit easier on my Windows 2000 Professional machine, I created two
+ Command Prompt shortcuts on my main desktop. One is called "Start Tomcat", the other is called "Stop Tomcat". These two shorcuts
+ both call C:\Program_Files\jakarta-tomcat\bin\tomcat.bat but with different arguments i.e for "Start Tomcat" I use
+ %SystemRoot%\system32\cmd.exe /c "c:\program_files\jakarta-tomcat\bin\tomcat start" and for "Stop Tomcat" I use
+ %SystemRoot%\system32\cmd.exe /c "c:\program_files\jakarta-tomcat\bin\tomcat stop". The complete file listing for
+ C:\Program_Files\jakarta-tomcat\bin\tomcat.bat is shown below. I find these two shortcuts quite useful since they start and
+ stop the Apache service and Jakarta-Tomcat in the correct order.
+
+
Regards - mark.evans@dsto.defence.gov.au
+
+
+
C:\Program_Files\jakarta-tomcat\bin\tomcat.bat
+
+
+
+ @echo off
+ rem A batch file to start/stop tomcat server.
+
+ rem This batch file written and tested under Windows NT
+ rem Improvements to this file are welcome
+
+ rem Guess TOMCAT_HOME if it is not present
+
+
+ set TOMCAT_HOME=c:\program_files\jakarta-tomcat
+
+ set JAVA_HOME=c:\program_files\jdk1.3
+
+
+
+ if not "%TOMCAT_HOME%" == "" goto gothome
+
+ SET TOMCAT_HOME=.
+ if exist %TOMCAT_HOME%\bin\tomcat.bat goto gothome
+
+ SET TOMCAT_HOME=..
+ if exist %TOMCAT_HOME%\bin\tomcat.bat goto gothome
+
+ SET TOMCAT_HOME=
+ echo Unable to determine the value of TOMCAT_HOME.
+ goto eof
+
+ :gothome
+
+ rem Set up the CLASSPATH that we need
+
+ set cp=%CLASSPATH%
+
+ rem set CLASSPATH=.
+ set CLASSPATH=%TOMCAT_HOME%\classes
+
+ set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\xerces_1_0_3.jar
+ set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\xalan_1_0_1.jar
+ set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\fop_0_12_1.jar
+ set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\servlet_2_2.jar
+ set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\cocoon.jar
+
+
+
+ set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\webserver.jar
+ set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\jasper.jar
+ set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\xml.jar
+ rem set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\servlet.jar
+ set CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\tools.jar
+
+ if "%cp%" == "" goto next
+
+ rem else
+ set CLASSPATH=%CLASSPATH%;%cp%
+
+ :next
+ if "%1" == "start" goto startServer
+ if "%1" == "stop" goto stopServer
+ if "%1" == "run" goto runServer
+ if "%1" == "env" goto setupEnv
+ if "%1" == "ant" goto runAnt
+ if "%1" == "jspc" goto runJspc
+
+ echo Usage:
+ echo tomcat (start^|run^|env^|stop)
+ echo start - start tomcat in a separate window
+ echo run - start tomcat in the current window
+ echo env - setup the environment for tomcat
+ echo stop - stop tomcat
+ echo ant - run ant with tomcat context
+ echo jspc - run jsp pre compiler
+ goto cleanup
+
+ :startServer
+ echo __________________________
+ echo Stopping Apache Web Server
+ echo __________________________
+ net stop apache
+ rem echo Using classpath: %CLASSPATH%
+ echo _______________________________________
+ echo Starting JAKARTA-TOMCAT in a new window
+ echo _______________________________________
+ start "TOMCAT is RUNNING" /min java %TOMCAT_OPTS% -Dtomcat.home="%TOMCAT_HOME%" org.apache.tomcat.startup.Tomcat %2 %3 %4 %5 %6 %7 %8 %9
+ echo __________________________
+ echo Starting Apache Web Server
+ echo __________________________
+ net start apache
+ goto cleanup
+
+ :runServer
+ rem Start the Tomcat Server
+ echo Using classpath: %CLASSPATH%
+ java %TOMCAT_OPTS% -Dtomcat.home="%TOMCAT_HOME%" org.apache.tomcat.startup.Tomcat %2 %3 %4 %5 %6 %7 %8 %9
+ goto cleanup
+
+ :stopServer
+ rem Stop the Tomcat Server
+ rem echo Using classpath: %CLASSPATH%
+ echo ______________________
+ echo Sopping JAKARTA-TOMCAT
+ echo ______________________
+ java %TOMCAT_OPTS% -Dtomcat.home="%TOMCAT_HOME%" org.apache.tomcat.startup.Tomcat -stop %2 %3 %4 %5 %6 %7 %8 %9
+ goto cleanup
+
+ :runAnt
+ rem Run ant
+ set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\ant.jar
+ echo Using classpath: %CLASSPATH%
+ java %ANT_OPTS% -Dant.home="%TOMCAT_HOME%" -Dtomcat.home="%TOMCAT_HOME%" org.apache.tools.ant.Main %2 %3 %4 %5 %6 %7 %8 %9
+ goto cleanup
+
+ :runJspc
+ rem Run ant
+ echo Using classpath: %CLASSPATH%
+ java %JSPC_OPTS% -Dtomcat.home="%TOMCAT_HOME%" org.apache.jasper.JspC %2 %3 %4 %5 %6 %7 %8 %9
+ goto cleanup
+
+ :setupEnv
+ set cp=%CLASSPATH%
+
+ :cleanup
+ rem clean up
+
+ set CLASSPATH=%cp%
+ set port=
+ set host=
+ set test=
+ set jsdkJars=
+ set jspJars=
+ set beanJars=
+ set miscJars=
+ set appJars=
+ set appClassPath=
+ set cp=
+
+ rem pause
+ :eof
+
+
- Here is a list of web sites that are proudly powered by Cocoon.
+ Here is a list of web sites that are proudly powered by Cocoon (in chronological order):
-
http://www.zen.co.za/
-
http://www.randshow.co.za/
-
http://www.mtnartinst.com/
-
http://www.north-wood.co.uk/
-
http://www.eurofootball.com/ (partially)
+
http://www.zen.co.za
+
http://www.randshow.co.za
+
http://www.mtnartinst.com
+
http://www.north-wood.co.uk
+
http://www.eurofootball.com
+
http://www.caida.org
+
http://grapeape.codingapes.com
+
http://www.xmls.com
+
http://www.xmltimes.com
+
-
+
- If you don't find your site upthere, make sure you tell us. We want this list
+ If you don't find your site here, make sure you tell us. We want this list
to grow bigger every day :-)