Re: [Cppcms-users] question about mapper
Brought to you by:
artyom-beilis
From: 4. <440...@qq...> - 2012-01-18 11:46:01
|
I see your email say that if regular expression is "^/page/(\\d+)/(\\w+)$" , exp1=2, why exp1 = 2 ? use your example "page/13/to_be_or_not" I think exp is 12 and exp2 is to_be_or not. and the url is "/page/13/to_be_or_not", then handler would be called with "to_be_or_not" as its first parameter I think 12 as its first parameter. why did you say to_be_or_not as its first parameter? I do not know why? ------------------ Original ------------------ From: "Artyom Beilis"<art...@ya...>; Date: Wed, Jan 18, 2012 07:25 PM To: "cpp...@li..."<cpp...@li...>; Subject: Re: [Cppcms-users] question about mapper The key /number - starts searching from root of the application, and number starts searching from current location. See: http://art-blog.no-ip.info/cppcms_ref_v0_99/classcppcms_1_1url__mapper.html#_details Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.sf.net/ CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/ From: Leon <le...@wl...> To: cpp...@li... Sent: Wednesday, January 18, 2012 12:51 PM Subject: [Cppcms-users] question about mapper In the url_mapping example, the mapping is done with the following code: mapper().assign("number","/number/{1}"); Here the key is "number". Later, a url is constructed with: url("/number",1) Here the key is "/number". My question is that why the key parameter passed to url(...) is "/number" not "number"? Thanks in advance. Best regards. ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users |