Andre,

I checked in your faq's. can you do a "build docs" from the latest cvs version and 
take a look

Thanks,
dims

--- Andre Juffer <[EMAIL PROTECTED]> wrote:
> Hi Davanum,
> 
> 
> the original problem was how to get apache working together with tomcat
> and Cocccn2. There is actually a FAQ "Why does nothing happen when I
> access 'http://localhost/cocoon/'?" Some possibilities are listed there.
> in addition to these, in the case of mod_jk, it is crucial to include
> the directive
> 
> JkMount /cocoon/* ajp12
> 
> along with other directives that are already listed in mod_jk.conf-auto
> in the tomcat/conf directory. One could add the above directive at the 
> end of httpd.conf.
> 
> 
> 
> The second problem I was looking into was the following. How can I use
> the request http://your.server.org/Foo/welcome (as an example), where
> Foo is an application that depends on Cocoon2, instead of employing
> something like http://your.server.org/cocoon/Foo/welcome. So, it would
> not be required to always include "cocoon" in the request. Mainly based 
> upon Luca Morandini's suggestions, I could get things to work with the 
> following two modifications:
> 
> 1. Add to httpd.cond:
> 
> RewriteEngine On
> RewriteLog "/var/log/rewrite.log"
> RewriteLogLevel 0
> RewriteRule ^/Foo /cocoon/Foo/ [R]
> RewriteRule ^/Foo(.*) /cocoon/Foo$1 [R]
> 
> The file rewrite.log does not have to be located in /var/log. For 
> instance, under Windows NT other locations may be appropriate. The 
> RewriteLogLevel should be set 3 for debug purposes. The third line is 
> essentially a redirect, so that Foo become /cocoon/Foo/ with the 
> trailing /, without it the request would not map onto
> 
> <map:match pattern="">
>    <map:redirect-to uri="welcome" />
> </map:match>
> 
> if I request http://your.server.org/Foo.
> 
> Finally, the last RewriteRule could depend on the local settings.
> The original suggestion by Luca was a single line entry (that replaces 
> both RewriteRules above) according to
> 
> RewriteRule Foo/(.*) /cocoon/Foo/$1 [PT]
> 
> but this did not work in my case (Slackware Linux with Apache1.3, 
> tomcat3.2.2, Cocoon2). Again, these RewriteRules may vary somewhat 
> depending on the local settings. You may have to experiment somewhat
> 
> 2. Add to the sitemap.xmap in the cocoon directory:
> 
> <map:pipeline>
>     <map:match pattern="Foo/**">
>       <map:mount uri-prefix="Fru" src="/www/Foo/"
>                  check-reload="yes" reload-method="synchron"/>
>     </map:match>
> </map:pipeline>
> 
> Here, /www/Foo is a some directory on the local file system where the 
> xml, xsp, .., files of the application Foo live.
> 
> As Luca pointed out, the src attribute may have to include "file://"
> 
> I hope that the information above is useful for others as well.
> 
> 
> With thanks to Luca, Lajos, Anders, and others.
> 
> Cheers,
> Andre.
> 
> 
> 
> 
> 
> Davanum Srinivas wrote:
> 
>  > Andre,
>  >
>  > Can you re-post the complete instructions in the form of a FAQ? I 
> will check it in.
>  >
>  > Thanks,
>  > dims
>  >
>  > --- Andre Juffer <[EMAIL PROTECTED]> wrote:
>  >
>  >> Hi All,
>  >>
>  >> I got it finally working. The directive
>  >>
>  >> JkMount /cocoon/* ajp12
>  >>
>  >> did it. I apparently kept on missing that part, since this was not
>  >> required for tomcat-apache-cocoon1, where always, it seems, .xml was
>  >> employed to redirect xml request to cocoon1.
>  >>
>  >> I would support the suggestion of Luca to put these few things into the
>  >> FAQ, because I would assume that more people make the same mistake 
> as I did.
>  >>
>  >> Thank you for your help,
>  >>
>  >> Andre.
>  >>
>  >>
>  >>
>  >> Luca Morandini wrote:
>  >>
>  >>
>  >>> Andre,
>  >>>
>  >>>  this is snippet from my mod_jk.conf (get rid of mod_jk.conf-auto, or it
>  >>> will be overwritten every time you start Tomcat):
>  >>>
>  >>> <IfModule mod_jk.c>
>  >>>
>  >>> JkWorkersFile "C:/Apps/Tomcat/conf/workers.properties"
>  >>> JkLogFile "C:/Apps/Tomcat/logs/mod_jk.log"
>  >>> JkLogLevel warn
>  >>> JkMount /*.jsp ajp12
>  >>> JkMount /*.xml ajp12
>  >>>
>  >>> JkMount /cocoon/* ajp12
>  >>>
>  >>> </IfModule>
>  >>>
>  >>>  I presume this will do the trick of redirecting.
>  >>>
>  >>>  Moreover, somewhere down mod_jk.conf, there is this cocoon-related 
> stuff:
>  >>>
>  >>> #
>  >>> # The following line makes apache aware of the location of the /cocoon
>  >>> context
>  >>> #
>  >>> Alias /cocoon "C:/Apps/Tomcat/webapps/cocoon"
>  >>> <Directory "C:/Apps/Tomcat/webapps/cocoon">
>  >>>     Options Indexes FollowSymLinks
>  >>> </Directory>
>  >>>
>  >>> #
>  >>> # The following line mounts all JSP files and the /servlet/ uri to 
> tomcat
>  >>> #
>  >>> JkMount /cocoon/servlet/* ajp12
>  >>> JkMount /cocoon/*.jsp ajp12
>  >>>
>  >>> #
>  >>> # The following line prohibits users from directly accessing WEB-INF
>  >>> #
>  >>> <Location "/cocoon/WEB-INF/">
>  >>>     AllowOverride None
>  >>>     deny from all
>  >>> </Location>
>  >>>
>  >>> #
>  >>> # Use Directory too. On Windows, Location doesn't work unless case 
> matches
>  >>> #
>  >>> <Directory "C:/Apps/Tomcat/webapps/cocoon/WEB-INF/">
>  >>>     AllowOverride None
>  >>>     deny from all
>  >>> </Directory>
>  >>>
>  >>> #
>  >>> # The following line prohibits users from directly accessing META-INF
>  >>> #
>  >>> <Location "/cocoon/META-INF/">
>  >>>     AllowOverride None
>  >>>     deny from all
>  >>> </Location>
>  >>>
>  >>> #
>  >>> # Use Directory too. On Windows, Location doesn't work unless case 
> matches
>  >>> #
>  >>> <Directory "C:/Apps/Tomcat/webapps/cocoon/META-INF/">
>  >>>     AllowOverride None
>  >>>     deny from all
>  >>> </Directory>
>  >>>
>  >
> 
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
> 


=====
Davanum Srinivas, JNI-FAQ Manager
http://www.jGuru.com/faq/JNI

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to