Title: RE: newbies : problem with sitemap.xmap

From what I can see, the only matcher you have set up is the <map:matcher name="referer-match"
 src="" which is totally
useless to you in this case.  You must not be understanding some basic concepts either
because you have not read the user docs, or are not understanding them for
some reason. 

Look at the definitions for the matchers, and you will find that you need
the Wildcard URI matcher, not the Wildcard Header Matcher.  You need to add
a definition for org.apache.cocoon.matching.WildcardURIMatcher in your map:matchers
section and use whatever name you give it in your map:match type=

So, you need to change:
>       <map:matchers>
>         <map:matcher name="referer-match"
> src="">
>       </map:matchers>

to
       <map:matchers>
         <map:matcher name="wildcard"
 src="">
       </map:matchers>

and

>        <map:match type="referer-match" pattern="staticpages/*.html">
>            <map:generate type="html" src="">
>            <map:serialize/>
>        </map:match>

to

        <map:match type="wildcard" pattern="staticpages/*.html">
            <map:generate type="html" src="">
            <map:serialize/>
        </map:match>

Additionally, note:
1) you can add a parameter to map:matchers, default="wildcard" so that you can
eliminate the type="wildcard" in your map:match statements if you do more than a few.
2) the string "wildcard" is not magic - you just need to use the same string in <map:matcher name="..." and in your type="..."

Geoff

Geoff

> -----Original Message-----
> From: arnaud [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 13, 2003 10:01 AM
> To: [EMAIL PROTECTED]
> Subject: RE: newbies : problem with sitemap.xmap
>
>
> ok now its work
>
> just one problem
>
> when i request
> http://localhost:8080/cocoonsamples/staticpages/index.html
> i obtain this error in browser (nothing in tomcat stdout)
>
> ----------------------------------------------
> Cocoon 2 - Resource not found
>
> type resource-not-found
>
> message Resource not found
>
> description The requested URI
> "/cocoonsamples/staticpages/index.html" was
> not found.
>
> sender org.apache.cocoon.servlet.CocoonServlet
>
> source Cocoon servlet
>
> request-uri
>
> /cocoonsamples/staticpages/index.html
>
> path-info
>
> staticpages/index.html
>
> ----------------------------------------------
>
>
>
>
> but index.html exist in staticpages directory
>
>
> cocoonsamples +
>               |
>               +- staticpages
>               |
>               +- WEB-INF +
>                          |
>                          +- classes
>
>
>
> any idea ?
>
>
>
>
> ----------------------------------------------
>
> <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
>
>     <map:components>
>
>       <map:generators>
>         <map:generator name="html"
> src="">
>       </map:generators>
>
>       <map:transformers default="xslt"/>
>
>       <map:serializers  default="html"/>
>
>       <map:matchers>
>         <map:matcher name="referer-match"
> src="">
>       </map:matchers>
>
>     </map:components>
>
>    <map:pipelines>
>
>      <map:pipeline>
>        <map:match type="referer-match" pattern="staticpages/*.html">
>            <map:generate type="html" src="">
>            <map:serialize/>
>        </map:match>
>      </map:pipeline>
>
>    </map:pipelines>
>
> </map:sitemap>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
>
>
>

Reply via email to