Olivier, This is what i intend to do: There will be three parameters sent in the url by the user. Something like: http://localhost:8888/mail/blue.wml?cmd=userid+password+keyword I want to extract user id and password and authenticate. Also i want to compare the string keyword and decide the next step of action based on the keyword. Thus my aim is to read userid, password and keyword as strings and make a string compare. In java i would do something like if(keyword.equals("login")) { // do something. } else if (keyword.equals("read")) { // do something } Im not sure abt the exact equivalent in cocoon ie to read the parameter and make a string compare. regds, smith. Quoting [EMAIL PROTECTED]: > 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="" > 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=""/> > <!----> > <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=""/> > <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=""/> ? > > > > > > > > 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=""/> > > > > > > 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