Luca, Anders, Lajos,

I keep on having the same problem. While localhost:8080/cocoon correctly 
displays the welcome page of cocoon2, it seems to be impossible for me 
to get apache + tomcat 3.2.2 + cocoon2 working together, such also the 
request localhost/cocoon displays the welcome page.

The following is what being including into httpd.conf (in addition to 
what is already given in tomcat-3.2.2/conf/tomcat-apache.conf):

----
AddType text/xml .xml
AddHandler jserv-servlet .xml

Alias /cocoon "/usr/local/jakarta-tomcat-3.2.2/webapps/cocoon"
<Directory "/usr/local/jakarta-tomcat-3.2.2/webapps/cocoon">
     Options Indexes FollowSymLinks
</Directory>
ApJServMount /cocoon/servlet /cocoon
<Location "/cocoon/WEB-INF/">
     AllowOverride None
     deny from all
</Location>
<Location "/cocoon/META-INF/">
     AllowOverride None
     deny from all
</Location>

RewriteEngine On
RewriteLog "/var/log/rewrite.log"
RewriteLogLevel 3
RewriteRule Biocomputing/(.*) /cocoon/Biocomputing/$1 [PT]
----

The rewriting is actually working in the way it should (Thanks Luca). 
Also, localhost/cocoon in fact displays the CONTENT of the 
webapps/cocoon directory and the same for localhost/Biocomputing/ (with 
the trailing /), which gives me correctly the /cocoon/Biocomputing 
directory.

The key problem are these lines (I think)

AddType text/xml .xml
AddHandler jserv-servlet .xml

In fact, if I request localhost/cocoon/welcome.xml, the cocoon2 servlet 
is responding (in the way it should):

---
Cocoon 2 - Resource not found
type resource-not-found
message Resource not found
description The requested URI "/cocoon/welcome.xml" was not found.
sender org.apache.cocoon.servlet.CocoonServlet
source Cocoon servlet
request-uri
/cocoon/welcome.xml
path-info
welcome.xml
---

The sitemap is not compiled, though. If I add to the sitemap the following

---
    <map:match pattern="welcome.xml">
     <map:redirect-to uri="welcome"/>
    </map:match>
---

localhost/cocoon/welcome.xml will not display the welcome. It is shown, 
of course, upon the request localhost:8080/cocoon/welcome.xml.

In fact, the request localhost/cocoon/welcome results in

----
Not Found
The requested URL /cocoon/welcome was not found on this server.
Apache/1.3.12 Server at ajuffer-dsl.oulu.fi Port 80
-----

So, in the latter case, Apache is handling the request instead of 
cocoon2. Obviously, this is because there is no .xml extension.

If you are using Tomcat 3.2.2, Apache 1.3.* and cocoon2, what exactly 
have you for AddType and AddHandler directives in your configuration?

Of course, I can always write all my files ending with e.g. xml, xsp and 
adapt the sitemap accordingly (and use 8080). No objections there, but 
it is ugly. Currently, I think, requests like <your-server>/Foo/foo 
without having some extension at the foo, cannot be resolved correctly 
in a simple way such that cocoon2 takes over the request.

Or do I still miss something totally ..... what, on earth?

Cheers,
Andre.





-- 
Andre H. Juffer              | Phone: +358-8-553 1683
The Biocenter and            | Fax: +358-8-553-1141
     the Dep. of Biochemistry | Email: [EMAIL PROTECTED]
University of Oulu, Finland  | WWW: http://www.biochem.oulu.fi/research.html


---------------------------------------------------------------------
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