Re: [Cppcms-users] What exactly url_mapper does?
Brought to you by:
artyom-beilis
From: Artyom B. <art...@ya...> - 2011-08-05 04:33:21
|
> > >Who can tell me how to write an regular expression for the following URL? >http://localhost/search/village?x=1&y=2 > > >? is a big problem,I tried \\?,but it doesn't work. > You don't! Read this: http://art-blog.no-ip.info/wikipp/en/page/cppcms_1x_tut_url_mapping > >陈抒 >Best regards >http://blog.csdn.net/sheismylife > > > >On Fri, Aug 5, 2011 at 3:21 AM, Artyom Beilis <art...@ya...> wrote: > >----- Original Message ----- >> >>> From: Abhishek Kaushik <abh...@gm...> >>> To: cpp...@li... >>> Cc: >>> Sent: Thursday, August 4, 2011 5:22 PM >>> Subject: Re: [Cppcms-users] What exactly url_mapper does? >>> >>> >>> >>> For Example: >>> >>> >>> flat_thread::flat_thread(cppcms::service &s) >>> : thread_shared(s) >>> { >>> dispatcher().assign(".*",&flat_thread::prepare,this,0); >>> mapper().assign("{1}"); >>> } >>> >>> Here I am not able to understand the role of >>> mapper().assign("{1}") I able to understand >>> dispatcher().assign() >>> is trying to assign the matched urls >>> to prepare function of flat thread with 0th parameter. >>> >>> Is mapper().assign() ignorable here? >>> >>> Please enlighten :( >>> thanks >>> Abhishek Kaushik >>> >>> >> >>Generally mapper is opposite of dispatcher: >> >>dispatcher: URL -> application >>mapper: "application" (by name) -> URL >> >> >>Read this: >> >> http://art-blog.no-ip.info/cppcms_ref_v0_99/classcppcms_1_1url__mapper.html#_details >> >>Unfortunately there is no url mapping tutorial yet, but the reference >>documentation of this feature should be quite full. >> >>Also take a look on message board example in the sources for use >>of URL mapper. >> >>Ask again if you have further questions after reading this. >> >>Artyom >> >>------------------------------------------------------------------------------ >>BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA >> >>The must-attend event for mobile developers. Connect with experts. >>Get tools for creating Super Apps. See the latest technologies. >>Sessions, hands-on labs, demos & much more. Register early & save! >>http://p.sf.net/sfu/rim-blackberry-1 >>_______________________________________________ >>Cppcms-users mailing list >>Cpp...@li... >>https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > >------------------------------------------------------------------------------ >BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA >The must-attend event for mobile developers. Connect with experts. >Get tools for creating Super Apps. See the latest technologies. >Sessions, hands-on labs, demos & much more. Register early & save! >http://p.sf.net/sfu/rim-blackberry-1 >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |