You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Mark S. Kent" <ma...@vistyx.com> on 2002/05/08 19:00:10 UTC
default page in sitemap
I'm trying to get a "default" page to load when matcher is not specified in
the URL like:
http://localhost:8080/cocoon/helptest/
In a sub-sitemap in the "helptest" folder, I have:
...
<map:pipelines>
<map:pipeline>
<map:match pattern="">
<map:redirect-to uri="index"/>
</map:match>
<map:match pattern="index">
<map:generate type="file" src="index.xml"/>
<map:transform type="xslt" src="helptest.xsl"/>
<map:serialize />
</map:match>
<map:match pattern="*">
<map:generate type="file" src="{1}.xml"/>
<map:transform type="xslt" src="helptest.xsl"/>
<map:serialize />
</map:match>
</map:pipeline>
</map:pipelines>
...
However, when I call the above URL, I simply get a listing of the folder
contents... it apparently doesn't "match" the empty string and load the
"index.xml" page as I expect. What am I doing wrong?
Mark
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: default page in sitemap
Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Mark S. Kent [mailto:mark.kent@vistyx.com]
>
> I'm trying to get a "default" page to load when matcher is not
specified in
> the URL like:
> http://localhost:8080/cocoon/helptest/
>
> In a sub-sitemap in the "helptest" folder, I have:
>
> ...
> <map:pipelines>
> <map:pipeline>
>
> <map:match pattern="">
> <map:redirect-to uri="index"/>
> </map:match>
>
> <map:match pattern="index">
> <map:generate type="file" src="index.xml"/>
> <map:transform type="xslt" src="helptest.xsl"/>
> <map:serialize />
> </map:match>
>
> <map:match pattern="*">
> <map:generate type="file" src="{1}.xml"/>
> <map:transform type="xslt" src="helptest.xsl"/>
> <map:serialize />
> </map:match>
>
> </map:pipeline>
> </map:pipelines>
> ...
>
> However, when I call the above URL, I simply get a listing of the
folder
> contents... it apparently doesn't "match" the empty string and load
the
> "index.xml" page as I expect. What am I doing wrong?
Do you have directory matcher (like pattern="**/") in the parent sitemap
before your map:mount?
Vadim
>
> Mark
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>