Now I want to be able to enter the URL "http://www.place.com/index.html" and get back the same result as "http://www.place.com:8080/cocoon/mount/MyWebSite/index.html".

I used mod_webapp with great result.  It does exactly what you need makes cocoon active on the root of the site.  Just know that EVERYTHING will need to pass through Cocoon this way because you make a web application of your WHOLE site, not just a portion of it.
I use Apache 1.3, Tomcat 4 and Cocoon v2 on Win 2K.
Here's what I did to get cocoon as a root web app for the site dm.dev.com (local site on my machine):
1) copy cocoon.war to dm.war (this created a "dm" web application)
2) add the web_app module to Apache using the documentation
3) add the following lines to the dm.dev.com virtual host
            WebAppConnection conn        warp  localhost:8008
            WebAppDeploy     dm   conn  /
This connects the web application dm to the root of the virtual host.  You may note that "dm" in the WebAppDeploy line is the name of the webapp, and thus the war file, and has nothing to do with the directory it's in.
4) go to dm.dev.com to activate the web application and have the war file deploy. This should bring up the Cocoon welcome page in the ROOT of the site!
5) edit the sitemap.xmap in the dm directory and change the default file setting to
   <map:match pattern="">
    <map:redirect-to uri="index.htm"/>
   </map:match>

   <map:match pattern="**.htm">
    <map:generate  type="file" src=""{1}.xml"/>     <map:transform type="xslt" src=""styles/default.xsl"/>     <map:serialize/>
   </map:match>
6) if I surf to dm.dev.com the URL in the address bar changes to dm.dev.com/index.htm and the index.xml file is translated using the styles/default.xsl file and voila instant HTML!  This automatically works for subdirectories too since I'm using the double asterix.  So a request to "/prod/index.htm" will create a call to "/prod/index.xml" and translate it with the /styles/default.xsl file.

7) you can strip the sitemap of all the sample and doc pipelines and mappings.

Using this technique I have a sepparate directory and Cocoon configuration for every site I run.  A major advantage to my oppinion.

If you add "WebAppInfo /webapp-info" at the bottom of the Apache.conf file you can surf to http://localhost/webapp-info/ (don't forget the trailing slash) and see if the web-app has started.  If you don't see a directory in the web-app Apache has not connected to Tomcat.  You need to restart apache and make sure Tomcat start BEFORE Apache.  If you install both as a service you need to install Apache using the -W parameter.  Check the parameters using "apache -h" at the command prompt.

BTW you can stop and start windows services using the command "net stop service" where you replace service with the name of the installed service.  Tomcat is called "Apache Tomcat" and Apache is simply called "Apache".  "Net stop "Apache tomcat"" will stop Tomcat.

If you have any other questions or would like a copy of my config files, just mail me directly.

Bert
--------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to