If you apply the attached patch (which just adds a simple <map:redirect-to>) to the current CVS and try to load the default Cocoon home page for the webapp, you'll get a nice NPE at org.apache.cocoon.environment.AbstractEnvironment.resolveURI(AbstractEnvironment.java:467).

This is the same problem that causes bug #17673 [1] and it affects all redirects to URIs of the form "cocoon:/*". It is apparently due to AbstracEnvironment.startingProcessing not being called and consequently the sourceResolver member not being initialized.

Right now, I'm printing out stacktraces and looking at the call graph for the involved methods, but I'm not very familiar with the internals of sitemap processing and thus I'm going very slowly.

Excuse me if I'm insisting on this, but this bug is breaking the whole flow plus a lot more things, I think.

Ugo

[1]: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17673

--
Ugo Cei - Consorzio di Bioingegneria e Informatica Medica
P.le Volontari del Sangue, 2 - 27100 Pavia - Italy
Phone: +39.0382.525100 - E-mail: [EMAIL PROTECTED]
Index: src/webapp/sitemap.xmap
===================================================================
RCS file: /home/cvspublic/cocoon-2.1/src/webapp/sitemap.xmap,v
retrieving revision 1.1
diff -u -3 -r1.1 sitemap.xmap
--- src/webapp/sitemap.xmap     9 Mar 2003 00:10:42 -0000       1.1
+++ src/webapp/sitemap.xmap     10 Mar 2003 08:29:25 -0000
@@ -355,6 +355,10 @@
 
     <!-- welcome page -->
     <map:match pattern="">
+      <map:redirect-to uri="cocoon:/welcome"/>
+    </map:match> 
+
+    <map:match pattern="">
     
       <!--+
           | Start generating SAX events inside the pipeline. In this case,
@@ -451,4 +455,4 @@
 
  </map:pipelines>
 
-</map:sitemap>
\ No newline at end of file
+</map:sitemap>

Reply via email to