Adriano,

It seems that you don't tell Cocoon to do what you want to do...
1 - generate and serialize must be in the map:match, but given the error you get, I presume it's a copy-paste error.
1 - If you HTML-generate and HTML-serialize, you'd better HTML-read using a reader with HTML mime-type.
2 - the * at the end of the pattern is obsolete, because the default matcher don't care about request parameters.
3 - What do you want to do with your uid ? From your sitemap, you tell Cocoon to HTML-generate from the file names "key" (the request parameter "uid" value) located in the same folder than the sitemap. Cocoon complies because the file names "key" does not exist in the sitemap folder. You can use the context: protocol to point a file in the webapp context. For example, if your "key" file is in the $webapp/resources/ folder, the sitemap will look like :


<map:match pattern="blue.wml">
  <map:read src="context://resources/{request-param:uid}" mime-type="text/html"/>
</map:match>

(not sure about the mime type)
or if you want to do something with the file :

<map:match pattern="blue.wml">
  <map:generate type="html" src="context://resources/{request-param:uid}"/>
  <!-- do something -->
  <map:serialize type="html"/>
</map:match>

--
Olivier Billard



Adriano Smith wrote:

For the url:
http://localhost:8888/mail/blue.wml?uid=key

The sitemap snippet is
 <map:match pattern="*blue.wml*"/>
 <map:generate type="html" src="{request-param:uid}"/>
  <map:serialize type="html"/>

However i get the error:

Could not get resource file:/data/cocoon-2.1.3/build/webapp/mail/key

How can the value of uid be read?

Quoting  [EMAIL PROTECTED]:

> uid is not a query string... possibly your url
> should like -
>
> http://mailxx.com/uid?pwd=key
>
> Then the value of pwd, which is key, can be
> retrieved as described by Olivier.
>
> >>> [EMAIL PROTECTED] 2004/08/10 07:49:57 AM >>>
> if i have a url http://mailxx.com/uid?pwd?key
> can uid, pwd and key be accessed using
>
> <map:generate src="{request-param:uid}"/> ?
>
>
>
> Quoting  [EMAIL PROTECTED]:
>
> > Adriano Smith wrote:
> > > Is it possible to retrieve parameters passed in the url (through
> query
> >
> > > strings) using cocoon?
> > >
> >
> <http://ads.sify.com/RealMedia/ads/click_nx.ads/mail.sify.com/[EMAIL PROTECTED]>
> >
> > >
> >
> > Sure, using the "request" object.
> > For example
> >
> > in flowscript :
> >      var requestParameter =
> > cocoon.request.getParameter("MyParameter");
> > in sitemap :
> >      <map:generate src="{request-param:MyFileParameter}"/>
> >
> > etc...
> > You'll have more examples in the cocoon doc.
> >
> > --
> > Olivier


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to