You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Neeme Praks <ne...@one.lv> on 2000/05/21 20:30:52 UTC

Cocoon2 running with Tomcat + directory rendering issue (possible bug?)

I successfully managed to get Cocoon2 running with Tomcat 3.1 beta (on
W2K).
I would also document this, and I have a question regarding the
documentation. Are these XML files written by hand? Or is there some
existing editor for this? I suspect that they are written by hand?

Also, after playing around with Cocoon2 and trying out the samples, I
found that the directory rendering doesn't work on the root directory
("/servlet/Cocoon/")... When processing the URI, the CocoonServlet
always removes the first slash from the URI. However, in the case of
root directory, this results in empty URI. I fixed it by adding a check
for the length of the URI:

Index: CocoonServlet.java
===================================================================
RCS file:
/home/cvspublic/xml-cocoon/src/org/apache/cocoon/servlet/Attic/CocoonSer
vlet.java,v
retrieving revision 1.1.4.8
diff -r1.1.4.8 CocoonServlet.java
119c119
<             if (uri.charAt(0)=='/') uri=uri.substring(1);
---
>             if (uri.charAt(0)=='/' && uri.length() > 1)
uri=uri.substring(1);


Is this ok?
Neeme