cppcms-users Mailing List for CppCMS C++ Web Framework (Page 115)
Brought to you by:
artyom-beilis
You can subscribe to this list here.
2009 |
Jan
|
Feb
(22) |
Mar
|
Apr
(3) |
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
(15) |
Nov
(16) |
Dec
(13) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
(4) |
Feb
|
Mar
(8) |
Apr
(8) |
May
(8) |
Jun
(36) |
Jul
(63) |
Aug
(126) |
Sep
(47) |
Oct
(66) |
Nov
(46) |
Dec
(42) |
2011 |
Jan
(87) |
Feb
(24) |
Mar
(54) |
Apr
(21) |
May
(22) |
Jun
(18) |
Jul
(22) |
Aug
(101) |
Sep
(57) |
Oct
(33) |
Nov
(34) |
Dec
(66) |
2012 |
Jan
(64) |
Feb
(76) |
Mar
(73) |
Apr
(105) |
May
(93) |
Jun
(83) |
Jul
(84) |
Aug
(88) |
Sep
(57) |
Oct
(59) |
Nov
(35) |
Dec
(49) |
2013 |
Jan
(67) |
Feb
(17) |
Mar
(49) |
Apr
(64) |
May
(87) |
Jun
(64) |
Jul
(93) |
Aug
(23) |
Sep
(15) |
Oct
(16) |
Nov
(62) |
Dec
(73) |
2014 |
Jan
(5) |
Feb
(23) |
Mar
(21) |
Apr
(11) |
May
(1) |
Jun
(19) |
Jul
(27) |
Aug
(16) |
Sep
(5) |
Oct
(37) |
Nov
(12) |
Dec
(9) |
2015 |
Jan
(7) |
Feb
(7) |
Mar
(44) |
Apr
(28) |
May
(5) |
Jun
(12) |
Jul
(8) |
Aug
|
Sep
(39) |
Oct
(34) |
Nov
(30) |
Dec
(34) |
2016 |
Jan
(66) |
Feb
(23) |
Mar
(33) |
Apr
(15) |
May
(11) |
Jun
(15) |
Jul
(26) |
Aug
(4) |
Sep
(1) |
Oct
(30) |
Nov
(10) |
Dec
|
2017 |
Jan
(52) |
Feb
(9) |
Mar
(24) |
Apr
(16) |
May
(9) |
Jun
(12) |
Jul
(33) |
Aug
(8) |
Sep
|
Oct
(1) |
Nov
(2) |
Dec
(6) |
2018 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
(14) |
Jun
(1) |
Jul
(9) |
Aug
(1) |
Sep
(13) |
Oct
(8) |
Nov
(2) |
Dec
(2) |
2019 |
Jan
(1) |
Feb
(1) |
Mar
(3) |
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2020 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(9) |
Jul
(6) |
Aug
(25) |
Sep
(10) |
Oct
(10) |
Nov
(6) |
Dec
|
2021 |
Jan
|
Feb
|
Mar
(7) |
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(9) |
Oct
(1) |
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Cristian O. <one...@gm...> - 2011-04-05 08:18:01
|
Hi, I would like to ask if there is a possibility to control the number of threads that can be used to handle requests for a type of application? In other words a kind of priority between the mounted applications. For example if I have: A - mounted at /A B - mounted at /B and 15 threads then I would like to say that A is more important so allocate 12 threads to handling requests to /A and 3 to be /B. Regards, Cristian |
From: Artyom <art...@ya...> - 2011-03-30 13:35:51
|
> > One question: I will have one skin to page. Have many skins is a problem? > There is no specific limit on skins number, the search of specific skin and view has log(n) complexity and should be fast. However why do you need skin per page? Create skin for something that is really "skin" i.e. separate parts of application like admin interace user interface. The basic idea is that you can use inheritance withing same skin and extend your views. > PS: I would like to say that I have impressed with framework, it is very > powerful and elegant. Congratulations. Thanks > > Renato Artyom |
From: Renato F. <re....@ay...> - 2011-03-29 21:27:14
|
Hi, Thanks for help, now work :0) One question: I will have one skin to page. Have many skins is a problem? PS: I would like to say that I have impressed with framework, it is very powerful and elegant. Congratulations. Renato -----Mensagem original----- De: Artyom [mailto:art...@ya...] Enviada em: terça-feira, 29 de março de 2011 17:41 Para: cpp...@li... Assunto: Re: [Cppcms-users] ERROR: There is no such skin When you have more then one skin you need to either specify its name explicitly as parameter to application::render function http://art-blog.no-ip.info/cppcms_ref_v0_99/classcppcms_1_1application.html# a68b4c88d0e81a41474933043690aa1a or you need to set the configuration value views.default_skin See http://art-blog.no-ip.info/wikipp/en/page/cppcms_1x_config#views.default_ski n (I forgot to document this specific option, I have just added it to the wiki) What is important to understand that if you have different skins you need to select one somehow. Artyom ----- Original Message ---- > From: Renato Forti <re....@ay...> > To: cpp...@li... > Sent: Tue, March 29, 2011 9:31:30 PM > Subject: [Cppcms-users] ERROR: There is no such skin > > Hi All, > > What is this error: > > "There is no such skin:" > > I have 2 templates: > >----------------------------------------------------------------------- >------------------------------------ >- > > <% c++ #include "HomeContent.h" %> > <% skin Home %> > <% view home uses Content::HomeContent %> <% template render() %> > > // HTML ... > > <% end template %> > <% end view %> > <% end skin %> > >----------------------------------------------------------------------- >------------------------------------- >- > > <% c++ #include "PortalContent.h" %> > <% skin Portal %> > <% view portal uses Content::PortalContent %> <% template render() > %> > > // HTML ... > > <% end template %> > <% end view %> > <% end skin %> > >----------------------------------------------------------------------- >------------------------------------- >- > > If I access: Home, al lis ok, but if i call Portal I receive: "There >is no such skin:" (no name in the end) and if I remove "HomeSkin.cpp" >of my project; Portal work!!! > > I am confused What is the problem? > > PS: All files is attached. > > Thanks > ---------------------------------------------------------------------------- -- Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users |
From: Artyom <art...@ya...> - 2011-03-29 20:40:38
|
When you have more then one skin you need to either specify its name explicitly as parameter to application::render function http://art-blog.no-ip.info/cppcms_ref_v0_99/classcppcms_1_1application.html#a68b4c88d0e81a41474933043690aa1a or you need to set the configuration value views.default_skin See http://art-blog.no-ip.info/wikipp/en/page/cppcms_1x_config#views.default_skin (I forgot to document this specific option, I have just added it to the wiki) What is important to understand that if you have different skins you need to select one somehow. Artyom ----- Original Message ---- > From: Renato Forti <re....@ay...> > To: cpp...@li... > Sent: Tue, March 29, 2011 9:31:30 PM > Subject: [Cppcms-users] ERROR: There is no such skin > > Hi All, > > What is this error: > > "There is no such skin:" > > I have 2 templates: > >----------------------------------------------------------------------------------------------------------- >- > > <% c++ #include "HomeContent.h" %> > <% skin Home %> > <% view home uses Content::HomeContent %> > <% template render() %> > > // HTML ... > > <% end template %> > <% end view %> > <% end skin %> > >------------------------------------------------------------------------------------------------------------ >- > > <% c++ #include "PortalContent.h" %> > <% skin Portal %> > <% view portal uses Content::PortalContent %> > <% template render() %> > > // HTML ... > > <% end template %> > <% end view %> > <% end skin %> > >------------------------------------------------------------------------------------------------------------ >- > > If I access: Home, al lis ok, but if i call Portal I receive: "There is no >such skin:" (no name in the end) > and if I remove "HomeSkin.cpp" of my project; Portal work!!! > > I am confused What is the problem? > > PS: All files is attached. > > Thanks > |
From: Renato F. <re....@ay...> - 2011-03-29 19:31:53
|
Hi All, What is this error: "There is no such skin:" I have 2 templates: ----------------------------------------------------------------------------------------------------------- <% c++ #include "HomeContent.h" %> <% skin Home %> <% view home uses Content::HomeContent %> <% template render() %> // HTML ... <% end template %> <% end view %> <% end skin %> ------------------------------------------------------------------------------------------------------------ <% c++ #include "PortalContent.h" %> <% skin Portal %> <% view portal uses Content::PortalContent %> <% template render() %> // HTML ... <% end template %> <% end view %> <% end skin %> ------------------------------------------------------------------------------------------------------------ If I access: Home, al lis ok, but if i call Portal I receive: "There is no such skin:" (no name in the end) and if I remove "HomeSkin.cpp" of my project; Portal work!!! I am confused What is the problem? PS: All files is attached. Thanks |
From: Renato F. <re....@ay...> - 2011-03-26 13:49:23
|
Hi Artyom, Thanks for the class, really you should put this information on wiki is very good and clear. Now I will upgrade my version to CppCMS 0.99.7 and put sessions to work. :0) Thanks, I 'am very impressed: CppCMS is a great project, and its fills a hole in C++ development (C++ Web Development). -----Mensagem original----- De: Artyom [mailto:art...@ya...] Enviada em: sábado, 26 de março de 2011 06:13 Para: cpp...@li... Assunto: Re: [Cppcms-users] RES: RES: URL maps Hello, First of all I'll try to explain. Generally your web server, apache, lighttpd, nginx and all others map some script name to the FastCGI application and serve all other static files. So for example if you have directory like /project/root /project/root/media/my.css /project/root/images/mypic.png And then to distinguish between the application and the static files so called script name is provided. So we give let's say script name "/myapp" then everything like http://server/myapp http://server/myapp/page/cool/1034 http://server/myapp/something/else Would be passed to the application, while everything else (static files) would be server by the web server, and it is very-very good in it. Now when URL like http://server/myapp/page/cool/1034 Is serverd It is divided into CGI variables: HTTP_HOST server SCRIPT_NAME /myapp PATH_INFO /page/cool/1034 Now dispatching by default works with PATH_INFO which is generally the best option. So you need to do URL mapping against it. So in this configuration. document_root is "/project/root" - local file system script is "/myapp" And you should map like "/page/.*" You can take a look as a good example the message_board in new 0.99.7 release. Now setting "/" as script is bad idea as it passes everything to the application and you don't want it as it forces you to serve static content (and you don't want to) You can make URLs like http://host/page/cool/1023 And http://host/media/my.css Work using URL rewriting provided by all modern real web servers, however such things are not supported by the internal web server which is suitable for debugging only. (Ohhh I need to add this to CppCMS's wiki as it is quite common question). So in your case it should be "http" : { "script" : "/portal", }, And matching: add(_test, "/test((/.*))?",2); // first match - from test/foo -> extracts "/foo" for // URL http://host/portal/test/foo add(_portal, "(.*)", 1); // match everything else // extracts "/bar" from "/bar for URL http://host/portal/bar Artyom ----- Original Message ---- > From: Renato Forti <re....@ay...> > To: cpp...@li... > Sent: Fri, March 25, 2011 5:56:58 PM > Subject: [Cppcms-users] RES: RES: URL maps > > Thanks for help, > > How config file should be to work? > > This is what I have: > > { > "vws" : { > "media" : "/media", > "root" : "/vws", > "host" : "localhost:8080", > "connection-string-dir" : >"E:\\project.vgsws\\resources\\connection-strings" > }, > "service" : { > "api" : "http", > "port" : 8080, > "worker_threads" : 20, > > }, > "http" : { > "script" : "/", > "script_names" : [ "/test", "/portal" ] > }, > "file_server" : { > "enable" : true > }, > "session" : { > "expire" : "renew", > "timeout" : 604800, > "location" : "client", > "client" : { > "encryptor" : "hmac", > "key" : "232074faa0fd37de20858bf8cd0a7d04" > } > }, > } > > And in class: > > class App : public cppcms::application { > public: > > Test _test; > Portal _portal; > > App(cppcms::service &s) > : cppcms::application(s) > , _test(s) > , _portal(s) > { > add(_test, "/test", 1); > add(_portal, "/portal", 1); > } > }; > > Thank you very much, for help. > > > -----Mensagem original----- > De: Cristian Oneț [mailto:one...@gm...] Enviada em: > sexta-feira, 25 de março de 2011 12:29 > Para: cpp...@li... > Assunto: Re: [Cppcms-users] RES: URL maps > > It does not work because you application is mounted at '/' and your >sub-applications at '/test' and '/home' and that's relative to your >parent application's mountpoint. So after '/' is matched for your main >application you will only have 'test' (not '/test') or 'home' (not > '/home') left from the url to match and it will not match. > > On Fri, Mar 25, 2011 at 4:57 PM, Renato Forti <re....@ay...> wrote: > > Like this: > > > > "http" : { > > "script_names" : [ "/test", "/ home " ] > > }, > > > > :o(, I did try, but don't work... > > > > Any tip? > > > > Thanks, thanks, thanks... > > > > -----Mensagem original----- > > De: Cristian Oneț [mailto:one...@gm...] Enviada em: > > sexta-feira, 25 de março de 2011 11:53 > > Para: cpp...@li... > > Assunto: Re: [Cppcms-users] URL maps > > > > I think that your problem is that "/test" and "/home" are missing > > from the >scripts section of the configuration file. > > > > On Fri, Mar 25, 2011 at 3:15 PM, Renato Forti > > <re....@ay...> wrote: > >> Hi, > >> > >> > >> > >> I am try understand how group and map url. > >> > >> > >> > >> For sample I have 2 classes: > >> > >> > >> > >> class Home : public cppcms::application > >> > >> class Test : public cppcms::application > >> > >> > >> > >> And a class that I can group apps: > >> > >> > >> > >> class App : public cppcms::application > >> > >> { > >> > >> public: > >> > >> > >> > >> Home _home; > >> > >> Test _test; > >> > >> > >> > >> App(cppcms::service &s) > >> > >> : cppcms::application(s) > >> > >> , _home(s) > >> > >> , _test(s) > >> > >> { > >> > >> add(_test, "/test", 1); > >> > >> add(_home, "/home", 2); > >> > >> } > >> > >> }; > >> > >> > >> > >> > >> > >> > >> > >> int main(int argc,char ** argv) > >> > >> { > >> > >> try > >> > >> { > >> > >> cppcms::service srv(argc, argv); > >> > >> > >> srv.applications_pool().mount(cppcms::applications_factory<App>()); > >> > >> srv.run(); > >> > >> } > >> > >> catch(std::exception const &e) > >> > >> { > >> > >> std::cerr<<e.what()<<std::endl; > >> > >> } > >> > >> } > >> > >> > >> > >> But when I’d tried access like: > >> > >> > >> > >> http://localhost:8080/test > >> > >> or > >> > >> http://localhost:8080/home > >> > >> > >> > >> Don’t work, What is wrong? > >> > >> > >> > >> My config file: > >> > >> > >> > >> { > >> > >> > >> > >> "service" : { > >> > >> "api" : "http", > >> > >> "port" : 8080, > >> > >> "worker_threads" : 20, > >> > >> > >> > >> }, > >> > >> "http" : { > >> > >> "script" : "/" > >> > >> }, > >> > >> "file_server" : { > >> > >> "enable" : true > >> > >> }, > >> > >> "session" : { > >> > >> "expire" : "renew", > >> > >> "timeout" : 604800, > >> > >> "location" : "client", > >> > >> "client" : { > >> > >> "encryptor" : > >> "hmac", > >> > >> "key" : > >> "232074faa0fd37de20858bf8cd0a7d04" > >> > >> } > >> > >> }, > >> > >> } > >> > >> > >> > >> Thaks > >> > >> > >> ------------------------------------------------------------------- > >> -- > >> - > >> -------- Enable your software for Intel(R) Active Management > >> Technology to meet the growing manageability and security demands > >> of your customers. Businesses are taking advantage of Intel(R) vPro > >> (TM) technology - will your software be a part of the solution? > >> Download the Intel(R) Manageability Checker today! > >> http://p.sf.net/sfu/intel-dev2devmar > >> _______________________________________________ > >> Cppcms-users mailing list > >> Cpp...@li... > >> https://lists.sourceforge.net/lists/listinfo/cppcms-users > >> > >> > > > > -------------------------------------------------------------------- > > -- > > -------- Enable your software for Intel(R) Active Management > > Technology to meet the growing manageability and security demands > > of your customers. Businesses are taking advantage of Intel(R) vPro > > (TM) technology - will your software be a part of the solution? > > Download the Intel(R) Manageability Checker today! > > http://p.sf.net/sfu/intel-dev2devmar > > _______________________________________________ > > Cppcms-users mailing list > > Cpp...@li... > > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > > > > -------------------------------------------------------------------- > > -- > > -------- Enable your software for Intel(R) Active Management > > Technology to meet the growing manageability and security demands > > of your customers. Businesses are taking advantage of Intel(R) vPro > > (TM) technology - will your software be a part of the solution? > > Download the Intel(R) Manageability Checker today! > > http://p.sf.net/sfu/intel-dev2devmar > > _______________________________________________ > > Cppcms-users mailing list > > Cpp...@li... > > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > >----------------------------------------------------------------------- >------- Enable your software for Intel(R) Active Management >Technology to meet the growing manageability and security demands of >your customers. Businesses are taking advantage of Intel(R) vPro (TM) >technology - will your software be a part of the solution? Download >the Intel(R) Manageability Checker today! >http://p.sf.net/sfu/intel-dev2devmar > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > ---------------------------------------------------------------------- > -------- Enable your software for Intel(R) Active Management > Technology to meet the growing manageability and security demands of > your customers. Businesses are taking advantage of Intel(R) vPro (TM) > technology - will your software be a part of the solution? Download > the Intel(R) Manageability Checker today! > http://p.sf.net/sfu/intel-dev2devmar > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > ------------------------------------------------------------------------------ Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users |
From: Artyom <art...@ya...> - 2011-03-26 09:13:34
|
Hello, First of all I'll try to explain. Generally your web server, apache, lighttpd, nginx and all others map some script name to the FastCGI application and serve all other static files. So for example if you have directory like /project/root /project/root/media/my.css /project/root/images/mypic.png And then to distinguish between the application and the static files so called script name is provided. So we give let's say script name "/myapp" then everything like http://server/myapp http://server/myapp/page/cool/1034 http://server/myapp/something/else Would be passed to the application, while everything else (static files) would be server by the web server, and it is very-very good in it. Now when URL like http://server/myapp/page/cool/1034 Is serverd It is divided into CGI variables: HTTP_HOST server SCRIPT_NAME /myapp PATH_INFO /page/cool/1034 Now dispatching by default works with PATH_INFO which is generally the best option. So you need to do URL mapping against it. So in this configuration. document_root is "/project/root" - local file system script is "/myapp" And you should map like "/page/.*" You can take a look as a good example the message_board in new 0.99.7 release. Now setting "/" as script is bad idea as it passes everything to the application and you don't want it as it forces you to serve static content (and you don't want to) You can make URLs like http://host/page/cool/1023 And http://host/media/my.css Work using URL rewriting provided by all modern real web servers, however such things are not supported by the internal web server which is suitable for debugging only. (Ohhh I need to add this to CppCMS's wiki as it is quite common question). So in your case it should be "http" : { "script" : "/portal", }, And matching: add(_test, "/test((/.*))?",2); // first match - from test/foo -> extracts "/foo" for // URL http://host/portal/test/foo add(_portal, "(.*)", 1); // match everything else // extracts "/bar" from "/bar for URL http://host/portal/bar Artyom ----- Original Message ---- > From: Renato Forti <re....@ay...> > To: cpp...@li... > Sent: Fri, March 25, 2011 5:56:58 PM > Subject: [Cppcms-users] RES: RES: URL maps > > Thanks for help, > > How config file should be to work? > > This is what I have: > > { > "vws" : { > "media" : "/media", > "root" : "/vws", > "host" : "localhost:8080", > "connection-string-dir" : >"E:\\project.vgsws\\resources\\connection-strings" > }, > "service" : { > "api" : "http", > "port" : 8080, > "worker_threads" : 20, > > }, > "http" : { > "script" : "/", > "script_names" : [ "/test", "/portal" ] > }, > "file_server" : { > "enable" : true > }, > "session" : { > "expire" : "renew", > "timeout" : 604800, > "location" : "client", > "client" : { > "encryptor" : "hmac", > "key" : "232074faa0fd37de20858bf8cd0a7d04" > } > }, > } > > And in class: > > class App : public cppcms::application > { > public: > > Test _test; > Portal _portal; > > App(cppcms::service &s) > : cppcms::application(s) > , _test(s) > , _portal(s) > { > add(_test, "/test", 1); > add(_portal, "/portal", 1); > } > }; > > Thank you very much, for help. > > > -----Mensagem original----- > De: Cristian Oneț [mailto:one...@gm...] > Enviada em: sexta-feira, 25 de março de 2011 12:29 > Para: cpp...@li... > Assunto: Re: [Cppcms-users] RES: URL maps > > It does not work because you application is mounted at '/' and your >sub-applications at '/test' and '/home' and that's relative to your parent >application's mountpoint. So after '/' is matched for your main application you >will only have 'test' (not '/test') or 'home' (not > '/home') left from the url to match and it will not match. > > On Fri, Mar 25, 2011 at 4:57 PM, Renato Forti <re....@ay...> wrote: > > Like this: > > > > "http" : { > > "script_names" : [ "/test", "/ home " ] > > }, > > > > :o(, I did try, but don't work... > > > > Any tip? > > > > Thanks, thanks, thanks... > > > > -----Mensagem original----- > > De: Cristian Oneț [mailto:one...@gm...] Enviada em: > > sexta-feira, 25 de março de 2011 11:53 > > Para: cpp...@li... > > Assunto: Re: [Cppcms-users] URL maps > > > > I think that your problem is that "/test" and "/home" are missing from the >scripts section of the configuration file. > > > > On Fri, Mar 25, 2011 at 3:15 PM, Renato Forti <re....@ay...> wrote: > >> Hi, > >> > >> > >> > >> I am try understand how group and map url. > >> > >> > >> > >> For sample I have 2 classes: > >> > >> > >> > >> class Home : public cppcms::application > >> > >> class Test : public cppcms::application > >> > >> > >> > >> And a class that I can group apps: > >> > >> > >> > >> class App : public cppcms::application > >> > >> { > >> > >> public: > >> > >> > >> > >> Home _home; > >> > >> Test _test; > >> > >> > >> > >> App(cppcms::service &s) > >> > >> : cppcms::application(s) > >> > >> , _home(s) > >> > >> , _test(s) > >> > >> { > >> > >> add(_test, "/test", 1); > >> > >> add(_home, "/home", 2); > >> > >> } > >> > >> }; > >> > >> > >> > >> > >> > >> > >> > >> int main(int argc,char ** argv) > >> > >> { > >> > >> try > >> > >> { > >> > >> cppcms::service srv(argc, argv); > >> > >> srv.applications_pool().mount(cppcms::applications_factory<App>()); > >> > >> srv.run(); > >> > >> } > >> > >> catch(std::exception const &e) > >> > >> { > >> > >> std::cerr<<e.what()<<std::endl; > >> > >> } > >> > >> } > >> > >> > >> > >> But when I’d tried access like: > >> > >> > >> > >> http://localhost:8080/test > >> > >> or > >> > >> http://localhost:8080/home > >> > >> > >> > >> Don’t work, What is wrong? > >> > >> > >> > >> My config file: > >> > >> > >> > >> { > >> > >> > >> > >> "service" : { > >> > >> "api" : "http", > >> > >> "port" : 8080, > >> > >> "worker_threads" : 20, > >> > >> > >> > >> }, > >> > >> "http" : { > >> > >> "script" : "/" > >> > >> }, > >> > >> "file_server" : { > >> > >> "enable" : true > >> > >> }, > >> > >> "session" : { > >> > >> "expire" : "renew", > >> > >> "timeout" : 604800, > >> > >> "location" : "client", > >> > >> "client" : { > >> > >> "encryptor" : "hmac", > >> > >> "key" : > >> "232074faa0fd37de20858bf8cd0a7d04" > >> > >> } > >> > >> }, > >> > >> } > >> > >> > >> > >> Thaks > >> > >> --------------------------------------------------------------------- > >> - > >> -------- Enable your software for Intel(R) Active Management > >> Technology to meet the growing manageability and security demands of > >> your customers. Businesses are taking advantage of Intel(R) vPro (TM) > >> technology - will your software be a part of the solution? Download > >> the Intel(R) Manageability Checker today! > >> http://p.sf.net/sfu/intel-dev2devmar > >> _______________________________________________ > >> Cppcms-users mailing list > >> Cpp...@li... > >> https://lists.sourceforge.net/lists/listinfo/cppcms-users > >> > >> > > ---------------------------------------------------------------------- > > -------- Enable your software for Intel(R) Active Management > > Technology to meet the growing manageability and security demands of > > your customers. Businesses are taking advantage of Intel(R) vPro (TM) > > technology - will your software be a part of the solution? Download > > the Intel(R) Manageability Checker today! > > http://p.sf.net/sfu/intel-dev2devmar > > _______________________________________________ > > Cppcms-users mailing list > > Cpp...@li... > > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > > ---------------------------------------------------------------------- > > -------- Enable your software for Intel(R) Active Management > > Technology to meet the growing manageability and security demands of > > your customers. Businesses are taking advantage of Intel(R) vPro (TM) > > technology - will your software be a part of the solution? Download > > the Intel(R) Manageability Checker today! > > http://p.sf.net/sfu/intel-dev2devmar > > _______________________________________________ > > Cppcms-users mailing list > > Cpp...@li... > > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > ------------------------------------------------------------------------------ > Enable your software for Intel(R) Active Management Technology to meet the >growing manageability and security demands of your customers. Businesses are >taking advantage of Intel(R) vPro (TM) technology - will your software be a >part of the solution? Download the Intel(R) Manageability Checker today! >http://p.sf.net/sfu/intel-dev2devmar > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > ------------------------------------------------------------------------------ > Enable your software for Intel(R) Active Management Technology to meet the > growing manageability and security demands of your customers. Businesses > are taking advantage of Intel(R) vPro (TM) technology - will your software > be a part of the solution? Download the Intel(R) Manageability Checker > today! http://p.sf.net/sfu/intel-dev2devmar > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: Artyom <art...@ya...> - 2011-03-26 08:47:32
|
Actually it is very strange as I have never seen such error. > thread_win6.cpp > Linking CXX shared library booster.dll > LINK : fatal error LNK1146: no argument specified with option '/machine:' > LINK failed. with 1146 > NMAKE : fatal error U1077: '"C:\Program Files (x86)\CMake > 2.8\bin\cmake.exe"' : > return code '0xffffffff' > Stop. > NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio > 9.0\ > VC\BIN\nmake.exe"' : return code '0x2' > Stop. > NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio > 9.0\ > VC\BIN\nmake.exe"' : return code '0x2' > Stop. > According to google I had found this thread: http://comments.gmane.org/gmane.comp.programming.tools.cmake.user/29126 Probably you should remove all build directory content and try to rerun cmake + nmake from the scratch. Make sre you open MSVC Command line envrionment (Programs -> Visual Studio -> Command Line Prompt) Something like that Also you may download 0.99.7 it is same as trunk. Artyom |
From: Artyom <art...@ya...> - 2011-03-26 08:38:34
|
> > http://cppcms.svn.sourceforge.net/viewvc/cppcms/framework/trunk/ > > But I can find: cppcms_boost.tar.bz2 > > Where is is? > > What more else I need do to get build version trunk in windows? > It was checkout together with the version just decompress it. Artyom P.S.: it comes in compressed version in order to increase SVN checkout performance as it contains lots of 3rd part file. |
From: Artyom <art...@ya...> - 2011-03-26 08:36:18
|
Hello All, CppCMS 0.99.7 Released: Release notes: http://art-blog.no-ip.info/cppcms/blog/post/77 Note for 0.99.6 users, there are security bugs fixed in 0.99.7 affecting you, read the release notes for workaround instructions in case you can not upgrade immediately. Best Regards, Artyom |
From: Renato F. <re....@ay...> - 2011-03-25 23:05:55
|
I did try copy cppcms_boost from version cppcms-0.99.6, this is result of nmake: C:\cppcms-trunk>nmake Microsoft (R) Program Maintenance Utility Version 9.00.30729.01 Copyright (C) Microsoft Corporation. All rights reserved. Scanning dependencies of target booster [ 0%] Building CXX object booster/CMakeFiles/booster.dir/lib/ptime/src/posix_ti me.cpp.obj posix_time.cpp [ 1%] Building CXX object booster/CMakeFiles/booster.dir/lib/ptime/src/ctime.cp p.obj ctime.cpp [ 1%] Building CXX object booster/CMakeFiles/booster.dir/lib/regex/src/pcre_reg ex.cpp.obj pcre_regex.cpp [ 1%] Building CXX object booster/CMakeFiles/booster.dir/lib/system/src/posix_e rror.cpp.obj posix_error.cpp [ 2%] Building CXX object booster/CMakeFiles/booster.dir/lib/system/src/windows _error.cpp.obj windows_error.cpp [ 2%] Building CXX object booster/CMakeFiles/booster.dir/lib/aio/src/aio_catego ry.cpp.obj aio_category.cpp [ 2%] Building CXX object booster/CMakeFiles/booster.dir/lib/aio/src/deadline_t imer.cpp.obj deadline_timer.cpp [ 3%] Building CXX object booster/CMakeFiles/booster.dir/lib/aio/src/endpoint.c pp.obj endpoint.cpp [ 3%] Building CXX object booster/CMakeFiles/booster.dir/lib/aio/src/io_service .cpp.obj io_service.cpp [ 4%] Building CXX object booster/CMakeFiles/booster.dir/lib/aio/src/reactor.cp p.obj reactor.cpp [ 4%] Building CXX object booster/CMakeFiles/booster.dir/lib/aio/src/select_ite rrupter.cpp.obj select_iterrupter.cpp [ 4%] Building CXX object booster/CMakeFiles/booster.dir/lib/aio/src/basic_io_d evice.cpp.obj basic_io_device.cpp [ 5%] Building CXX object booster/CMakeFiles/booster.dir/lib/aio/src/basic_sock et.cpp.obj basic_socket.cpp [ 5%] Building CXX object booster/CMakeFiles/booster.dir/lib/aio/src/acceptor.c pp.obj acceptor.cpp [ 5%] Building CXX object booster/CMakeFiles/booster.dir/lib/aio/src/stream_soc ket.cpp.obj stream_socket.cpp [ 6%] Building CXX object booster/CMakeFiles/booster.dir/lib/smart_ptr/src/sp_c ounted_base.cpp.obj sp_counted_base.cpp [ 6%] Building CXX object booster/CMakeFiles/booster.dir/lib/smart_ptr/src/atom ic_counter.cpp.obj atomic_counter.cpp [ 7%] Building CXX object booster/CMakeFiles/booster.dir/lib/log/src/log.cpp.ob j log.cpp C:\cppcms-trunk\booster\booster/nowide/fstream.h(49) : warning C4101: 'e' : unre ferenced local variable C:\cppcms-trunk\booster\booster/nowide/fstream.h(42) : while compiling c lass template member function 'booster::nowide::basic_filebuf<CharType> *booster ::nowide::basic_filebuf<CharType>::open(const char *,std::ios_base::openmode)' with [ CharType=char ] C:\cppcms-trunk\booster\booster/nowide/fstream.h(315) : see reference to class template instantiation 'booster::nowide::basic_filebuf<CharType>' being c ompiled with [ CharType=char ] C:\cppcms-trunk\booster\booster/nowide/fstream.h(314) : while compiling class template member function 'booster::nowide::basic_fstream<CharType>::basic_ fstream(void)' with [ CharType=char ] C:\cppcms-trunk\booster\lib\log\src\log.cpp(289) : see reference to clas s template instantiation 'booster::nowide::basic_fstream<CharType>' being compil ed with [ CharType=char ] [ 7%] Building CXX object booster/CMakeFiles/booster.dir/lib/iostreams/src/stre ambuf.cpp.obj streambuf.cpp C:\cppcms-trunk\booster\lib\iostreams\src\streambuf.cpp(51) : warning C4146: una ry minus operator applied to unsigned type, result still unsigned C:\cppcms-trunk\booster\lib\iostreams\src\streambuf.cpp(133) : warning C4244: 'a rgument' : conversion from '__int64' to 'std::streamoff', possible loss of data C:\cppcms-trunk\booster\lib\iostreams\src\streambuf.cpp(135) : warning C4244: 'a rgument' : conversion from '__int64' to 'std::streamoff', possible loss of data C:\cppcms-trunk\booster\lib\iostreams\src\streambuf.cpp(137) : warning C4244: 'a rgument' : conversion from '__int64' to 'std::streamoff', possible loss of data [ 7%] Building CXX object booster/CMakeFiles/booster.dir/lib/nowide/src/convert .cpp.obj convert.cpp [ 8%] Building CXX object booster/CMakeFiles/booster.dir/lib/backtrace/src/back trace.cpp.obj backtrace.cpp [ 8%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/encodin g/codepage.cpp.obj codepage.cpp [ 8%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/shared/ date_time.cpp.obj date_time.cpp [ 9%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/shared/ format.cpp.obj format.cpp [ 9%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/shared/ formatting.cpp.obj formatting.cpp [ 9%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/shared/ generator.cpp.obj generator.cpp [ 10%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/shared/ ids.cpp.obj ids.cpp [ 10%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/shared/ localization_backend.cpp.obj localization_backend.cpp [ 11%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/shared/ message.cpp.obj message.cpp [ 11%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/shared/ mo_lambda.cpp.obj mo_lambda.cpp [ 11%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/util/co decvt_converter.cpp.obj codecvt_converter.cpp [ 12%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/util/de fault_locale.cpp.obj default_locale.cpp [ 12%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/util/in fo.cpp.obj info.cpp [ 12%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/util/lo cale_data.cpp.obj locale_data.cpp [ 13%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/win32/c ollate.cpp.obj collate.cpp [ 13%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/win32/c onverter.cpp.obj converter.cpp [ 14%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/win32/l cid.cpp.obj lcid.cpp [ 14%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/win32/n umeric.cpp.obj numeric.cpp [ 14%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/win32/w in_backend.cpp.obj win_backend.cpp [ 15%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/std/cod ecvt.cpp.obj codecvt.cpp [ 15%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/std/col late.cpp.obj collate.cpp [ 15%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/std/con verter.cpp.obj converter.cpp [ 16%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/std/num eric.cpp.obj numeric.cpp [ 16%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/std/std _backend.cpp.obj std_backend.cpp [ 16%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/util/gr egorian.cpp.obj gregorian.cpp [ 17%] Building CXX object booster/CMakeFiles/booster.dir/lib/thread/src/thread_ win6.cpp.obj thread_win6.cpp Linking CXX shared library booster.dll LINK : fatal error LNK1146: no argument specified with option '/machine:' LINK failed. with 1146 NMAKE : fatal error U1077: '"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe"' : return code '0xffffffff' Stop. NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 9.0\ VC\BIN\nmake.exe"' : return code '0x2' Stop. NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 9.0\ VC\BIN\nmake.exe"' : return code '0x2' Stop. C:\cppcms-trunk> Any help, please? -----Mensagem original----- De: Renato Forti [mailto:re....@ay...] Enviada em: sexta-feira, 25 de março de 2011 19:53 Para: cpp...@li... Assunto: [Cppcms-users] Build trunk version on windows I'am trying build trunk version on windows, then I get: http://cppcms.svn.sourceforge.net/viewvc/cppcms/framework/trunk/ But I can find: cppcms_boost.tar.bz2 Where is is? What more else I need do to get build version trunk in windows? Thanks :0) ---------------------------------------------------------------------------- -- Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users |
From: Renato F. <re....@ay...> - 2011-03-25 23:04:50
|
I did try copy cppcms_boost from version cppcms-0.99.6, this is result of cmake: c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>cd C:\cppcms-trunk C:\cppcms-trunk>set PATH=C:\cppcms-trunk\booster;%PATH% C:\cppcms-trunk>set PATH=C:\cppcms-trunk\booster\booster;%PATH% C:\cppcms-trunk>set PATH=C:\pcre-7.9;%PATH% C:\cppcms-trunk>set PATH=C:\zlib-1.2.5;%PATH% C:\cppcms-trunk>set PATH=C:\OpenSSL-Win32;%PATH% C:\cppcms-trunk>cmake -G "NMake Makefiles" -DUSE_WINDOWS6_API=ON -DCMAKE_BUILD_T YPE=Release -DCMAKE_INSTALL_PREFIX=C:\cppcms-trunk -DCMAKE_INCLUDE_PATH=C:\pcre- 7.9 -DCMAKE_LIBRARY_PATH=C:\pcre-7.9 -DCMAKE_INCLUDE_PATH=C:\zlib-1.2.5 -DCMAKE_ LIBRARY_PATH=C:\zlib-1.2.5 -DCMAKE_INCLUDE_PATH=C:\OpenSSL-Win32\include -DCMAKE _LIBRARY_PATH=C:\OpenSSL-Win32\lib -- The C compiler identification is MSVC -- The CXX compiler identification is MSVC -- Check for CL compiler version -- Check for CL compiler version - 1500 -- Check if this is a free VC compiler -- Check if this is a free VC compiler - no -- Check for working C compiler: c:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/cl.exe -- Check for working C compiler: c:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/cl.exe -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: c:/Program Files (x86)/Microsoft Visual Studi o 9.0/VC/bin/cl.exe -- Check for working CXX compiler: c:/Program Files (x86)/Microsoft Visual Studi o 9.0/VC/bin/cl.exe -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Looking for ICU libraries -- ICU not found, disabling ICU localization backend -- Performing Test BOOSTER_HAS_GCC_SYNC -- Performing Test BOOSTER_HAS_GCC_SYNC - Failed -- Performing Test BOOSTER_HAVE_GCC_BITS_EXCHANGE_AND_ADD -- Performing Test BOOSTER_HAVE_GCC_BITS_EXCHANGE_AND_ADD - Failed -- Performing Test BOOSTER_HAVE_GCC_EXT_EXCHANGE_AND_ADD -- Performing Test BOOSTER_HAVE_GCC_EXT_EXCHANGE_AND_ADD - Failed -- Performing Test BOOSTER_HAVE_FREEBSD_ATOMIC -- Performing Test BOOSTER_HAVE_FREEBSD_ATOMIC - Failed -- Performing Test BOOSTER_HAVE_SOLARIS_ATOMIC -- Performing Test BOOSTER_HAVE_SOLARIS_ATOMIC - Failed -- Performing Test BOOSTER_HAVE_MAC_OS_X_ATOMIC -- Performing Test BOOSTER_HAVE_MAC_OS_X_ATOMIC - Failed -- Performing Test BOOSTER_HAVE_STDINT_H -- Performing Test BOOSTER_HAVE_STDINT_H - Failed -- Performing Test BOOSTER_HAVE_INTTYPES_H -- Performing Test BOOSTER_HAVE_INTTYPES_H - Failed -- Performing Test BOOSTER_AIO_HAVE_PF_INET6 -- Performing Test BOOSTER_AIO_HAVE_PF_INET6 - Failed -- Performing Test HAVE_WINDOWS6_API -- Performing Test HAVE_WINDOWS6_API - Success -- Performing Test CPPCMS_HAVE_STDINT_H -- Performing Test CPPCMS_HAVE_STDINT_H - Failed -- Performing Test CPPCMS_HAVE_INTTYPES_H -- Performing Test CPPCMS_HAVE_INTTYPES_H - Failed -- Looking for atoll -- Looking for atoll - not found -- Looking for _atoi64 -- Looking for _atoi64 - found -- Looking for snprintf -- Looking for snprintf - not found -- Looking for stat -- Looking for stat - found -- Looking for _stat -- Looking for _stat - found -- Performing Test CPPCMS_HAVE_STD_WSTRING -- Performing Test CPPCMS_HAVE_STD_WSTRING - Success -- Performing Test CPPCMS_HAVE_BSD_TM -- Performing Test CPPCMS_HAVE_BSD_TM - Failed -- Performing Test CPPCMS_HAVE_CPP0X_UXSTRING -- Performing Test CPPCMS_HAVE_CPP0X_UXSTRING - Failed -- Performing Test CPPCMS_HAVE_CPP_0X_AUTO -- Performing Test CPPCMS_HAVE_CPP_0X_AUTO - Failed -- Performing Test CPPCMS_HAVE_CPP_0X_DECLTYPE -- Performing Test CPPCMS_HAVE_CPP_0X_DECLTYPE - Failed -- Performing Test CPPCMS_HAVE_GCC_TYPEOF -- Performing Test CPPCMS_HAVE_GCC_TYPEOF - Failed -- Performing Test CPPCMS_HAVE_UNDERSCORE_TYPEOF -- Performing Test CPPCMS_HAVE_UNDERSCORE_TYPEOF - Failed -- Looking for canonicalize_file_name -- Looking for canonicalize_file_name - not found GNU-TLS Gcrypt or OpenSSL librarys are not found, disabling AES encryption support -- Configuring done -- Generating done -- Build files have been written to: C:/cppcms-trunk C:\cppcms-trunk> -----Mensagem original----- De: Renato Forti [mailto:re....@ay...] Enviada em: sexta-feira, 25 de março de 2011 19:53 Para: cpp...@li... Assunto: [Cppcms-users] Build trunk version on windows I'am trying build trunk version on windows, then I get: http://cppcms.svn.sourceforge.net/viewvc/cppcms/framework/trunk/ But I can find: cppcms_boost.tar.bz2 Where is is? What more else I need do to get build version trunk in windows? Thanks :0) ---------------------------------------------------------------------------- -- Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users |
From: Renato F. <re....@ay...> - 2011-03-25 22:53:04
|
I'am trying build trunk version on windows, then I get: http://cppcms.svn.sourceforge.net/viewvc/cppcms/framework/trunk/ But I can find: cppcms_boost.tar.bz2 Where is is? What more else I need do to get build version trunk in windows? Thanks :0) |
From: Renato F. <re....@ay...> - 2011-03-25 15:57:21
|
Thanks for help, How config file should be to work? This is what I have: { "vws" : { "media" : "/media", "root" : "/vws", "host" : "localhost:8080", "connection-string-dir" : "E:\\project.vgsws\\resources\\connection-strings" }, "service" : { "api" : "http", "port" : 8080, "worker_threads" : 20, }, "http" : { "script" : "/", "script_names" : [ "/test", "/portal" ] }, "file_server" : { "enable" : true }, "session" : { "expire" : "renew", "timeout" : 604800, "location" : "client", "client" : { "encryptor" : "hmac", "key" : "232074faa0fd37de20858bf8cd0a7d04" } }, } And in class: class App : public cppcms::application { public: Test _test; Portal _portal; App(cppcms::service &s) : cppcms::application(s) , _test(s) , _portal(s) { add(_test, "/test", 1); add(_portal, "/portal", 1); } }; Thank you very much, for help. -----Mensagem original----- De: Cristian Oneț [mailto:one...@gm...] Enviada em: sexta-feira, 25 de março de 2011 12:29 Para: cpp...@li... Assunto: Re: [Cppcms-users] RES: URL maps It does not work because you application is mounted at '/' and your sub-applications at '/test' and '/home' and that's relative to your parent application's mountpoint. So after '/' is matched for your main application you will only have 'test' (not '/test') or 'home' (not '/home') left from the url to match and it will not match. On Fri, Mar 25, 2011 at 4:57 PM, Renato Forti <re....@ay...> wrote: > Like this: > > "http" : { > "script_names" : [ "/test", "/ home " ] > }, > > :o(, I did try, but don't work... > > Any tip? > > Thanks, thanks, thanks... > > -----Mensagem original----- > De: Cristian Oneț [mailto:one...@gm...] Enviada em: > sexta-feira, 25 de março de 2011 11:53 > Para: cpp...@li... > Assunto: Re: [Cppcms-users] URL maps > > I think that your problem is that "/test" and "/home" are missing from the scripts section of the configuration file. > > On Fri, Mar 25, 2011 at 3:15 PM, Renato Forti <re....@ay...> wrote: >> Hi, >> >> >> >> I am try understand how group and map url. >> >> >> >> For sample I have 2 classes: >> >> >> >> class Home : public cppcms::application >> >> class Test : public cppcms::application >> >> >> >> And a class that I can group apps: >> >> >> >> class App : public cppcms::application >> >> { >> >> public: >> >> >> >> Home _home; >> >> Test _test; >> >> >> >> App(cppcms::service &s) >> >> : cppcms::application(s) >> >> , _home(s) >> >> , _test(s) >> >> { >> >> add(_test, "/test", 1); >> >> add(_home, "/home", 2); >> >> } >> >> }; >> >> >> >> >> >> >> >> int main(int argc,char ** argv) >> >> { >> >> try >> >> { >> >> cppcms::service srv(argc, argv); >> >> srv.applications_pool().mount(cppcms::applications_factory<App>()); >> >> srv.run(); >> >> } >> >> catch(std::exception const &e) >> >> { >> >> std::cerr<<e.what()<<std::endl; >> >> } >> >> } >> >> >> >> But when I’d tried access like: >> >> >> >> http://localhost:8080/test >> >> or >> >> http://localhost:8080/home >> >> >> >> Don’t work, What is wrong? >> >> >> >> My config file: >> >> >> >> { >> >> >> >> "service" : { >> >> "api" : "http", >> >> "port" : 8080, >> >> "worker_threads" : 20, >> >> >> >> }, >> >> "http" : { >> >> "script" : "/" >> >> }, >> >> "file_server" : { >> >> "enable" : true >> >> }, >> >> "session" : { >> >> "expire" : "renew", >> >> "timeout" : 604800, >> >> "location" : "client", >> >> "client" : { >> >> "encryptor" : "hmac", >> >> "key" : >> "232074faa0fd37de20858bf8cd0a7d04" >> >> } >> >> }, >> >> } >> >> >> >> Thaks >> >> --------------------------------------------------------------------- >> - >> -------- Enable your software for Intel(R) Active Management >> Technology to meet the growing manageability and security demands of >> your customers. Businesses are taking advantage of Intel(R) vPro (TM) >> technology - will your software be a part of the solution? Download >> the Intel(R) Manageability Checker today! >> http://p.sf.net/sfu/intel-dev2devmar >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> > ---------------------------------------------------------------------- > -------- Enable your software for Intel(R) Active Management > Technology to meet the growing manageability and security demands of > your customers. Businesses are taking advantage of Intel(R) vPro (TM) > technology - will your software be a part of the solution? Download > the Intel(R) Manageability Checker today! > http://p.sf.net/sfu/intel-dev2devmar > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > ---------------------------------------------------------------------- > -------- Enable your software for Intel(R) Active Management > Technology to meet the growing manageability and security demands of > your customers. Businesses are taking advantage of Intel(R) vPro (TM) > technology - will your software be a part of the solution? Download > the Intel(R) Manageability Checker today! > http://p.sf.net/sfu/intel-dev2devmar > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > ------------------------------------------------------------------------------ Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users |
From: Cristian O. <one...@gm...> - 2011-03-25 15:28:58
|
It does not work because you application is mounted at '/' and your sub-applications at '/test' and '/home' and that's relative to your parent application's mountpoint. So after '/' is matched for your main application you will only have 'test' (not '/test') or 'home' (not '/home') left from the url to match and it will not match. On Fri, Mar 25, 2011 at 4:57 PM, Renato Forti <re....@ay...> wrote: > Like this: > > "http" : { > "script_names" : [ "/test", "/ home " ] > }, > > :o(, I did try, but don't work... > > Any tip? > > Thanks, thanks, thanks... > > -----Mensagem original----- > De: Cristian Oneț [mailto:one...@gm...] > Enviada em: sexta-feira, 25 de março de 2011 11:53 > Para: cpp...@li... > Assunto: Re: [Cppcms-users] URL maps > > I think that your problem is that "/test" and "/home" are missing from the scripts section of the configuration file. > > On Fri, Mar 25, 2011 at 3:15 PM, Renato Forti <re....@ay...> wrote: >> Hi, >> >> >> >> I am try understand how group and map url. >> >> >> >> For sample I have 2 classes: >> >> >> >> class Home : public cppcms::application >> >> class Test : public cppcms::application >> >> >> >> And a class that I can group apps: >> >> >> >> class App : public cppcms::application >> >> { >> >> public: >> >> >> >> Home _home; >> >> Test _test; >> >> >> >> App(cppcms::service &s) >> >> : cppcms::application(s) >> >> , _home(s) >> >> , _test(s) >> >> { >> >> add(_test, "/test", 1); >> >> add(_home, "/home", 2); >> >> } >> >> }; >> >> >> >> >> >> >> >> int main(int argc,char ** argv) >> >> { >> >> try >> >> { >> >> cppcms::service srv(argc, argv); >> >> srv.applications_pool().mount(cppcms::applications_factory<App>()); >> >> srv.run(); >> >> } >> >> catch(std::exception const &e) >> >> { >> >> std::cerr<<e.what()<<std::endl; >> >> } >> >> } >> >> >> >> But when I’d tried access like: >> >> >> >> http://localhost:8080/test >> >> or >> >> http://localhost:8080/home >> >> >> >> Don’t work, What is wrong? >> >> >> >> My config file: >> >> >> >> { >> >> >> >> "service" : { >> >> "api" : "http", >> >> "port" : 8080, >> >> "worker_threads" : 20, >> >> >> >> }, >> >> "http" : { >> >> "script" : "/" >> >> }, >> >> "file_server" : { >> >> "enable" : true >> >> }, >> >> "session" : { >> >> "expire" : "renew", >> >> "timeout" : 604800, >> >> "location" : "client", >> >> "client" : { >> >> "encryptor" : "hmac", >> >> "key" : >> "232074faa0fd37de20858bf8cd0a7d04" >> >> } >> >> }, >> >> } >> >> >> >> Thaks >> >> ---------------------------------------------------------------------- >> -------- Enable your software for Intel(R) Active Management >> Technology to meet the growing manageability and security demands of >> your customers. Businesses are taking advantage of Intel(R) vPro (TM) >> technology - will your software be a part of the solution? Download >> the Intel(R) Manageability Checker today! >> http://p.sf.net/sfu/intel-dev2devmar >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> > ------------------------------------------------------------------------------ > Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > ------------------------------------------------------------------------------ > Enable your software for Intel(R) Active Management Technology to meet the > growing manageability and security demands of your customers. Businesses > are taking advantage of Intel(R) vPro (TM) technology - will your software > be a part of the solution? Download the Intel(R) Manageability Checker > today! http://p.sf.net/sfu/intel-dev2devmar > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: Renato F. <re....@ay...> - 2011-03-25 14:58:20
|
Like this: "http" : { "script_names" : [ "/test", "/ home " ] }, :o(, I did try, but don't work... Any tip? Thanks, thanks, thanks... -----Mensagem original----- De: Cristian Oneț [mailto:one...@gm...] Enviada em: sexta-feira, 25 de março de 2011 11:53 Para: cpp...@li... Assunto: Re: [Cppcms-users] URL maps I think that your problem is that "/test" and "/home" are missing from the scripts section of the configuration file. On Fri, Mar 25, 2011 at 3:15 PM, Renato Forti <re....@ay...> wrote: > Hi, > > > > I am try understand how group and map url. > > > > For sample I have 2 classes: > > > > class Home : public cppcms::application > > class Test : public cppcms::application > > > > And a class that I can group apps: > > > > class App : public cppcms::application > > { > > public: > > > > Home _home; > > Test _test; > > > > App(cppcms::service &s) > > : cppcms::application(s) > > , _home(s) > > , _test(s) > > { > > add(_test, "/test", 1); > > add(_home, "/home", 2); > > } > > }; > > > > > > > > int main(int argc,char ** argv) > > { > > try > > { > > cppcms::service srv(argc, argv); > > srv.applications_pool().mount(cppcms::applications_factory<App>()); > > srv.run(); > > } > > catch(std::exception const &e) > > { > > std::cerr<<e.what()<<std::endl; > > } > > } > > > > But when I’d tried access like: > > > > http://localhost:8080/test > > or > > http://localhost:8080/home > > > > Don’t work, What is wrong? > > > > My config file: > > > > { > > > > "service" : { > > "api" : "http", > > "port" : 8080, > > "worker_threads" : 20, > > > > }, > > "http" : { > > "script" : "/" > > }, > > "file_server" : { > > "enable" : true > > }, > > "session" : { > > "expire" : "renew", > > "timeout" : 604800, > > "location" : "client", > > "client" : { > > "encryptor" : "hmac", > > "key" : > "232074faa0fd37de20858bf8cd0a7d04" > > } > > }, > > } > > > > Thaks > > ---------------------------------------------------------------------- > -------- Enable your software for Intel(R) Active Management > Technology to meet the growing manageability and security demands of > your customers. Businesses are taking advantage of Intel(R) vPro (TM) > technology - will your software be a part of the solution? Download > the Intel(R) Manageability Checker today! > http://p.sf.net/sfu/intel-dev2devmar > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > ------------------------------------------------------------------------------ Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users |
From: Cristian O. <one...@gm...> - 2011-03-25 14:52:42
|
I think that your problem is that "/test" and "/home" are missing from the scripts section of the configuration file. On Fri, Mar 25, 2011 at 3:15 PM, Renato Forti <re....@ay...> wrote: > Hi, > > > > I am try understand how group and map url. > > > > For sample I have 2 classes: > > > > class Home : public cppcms::application > > class Test : public cppcms::application > > > > And a class that I can group apps: > > > > class App : public cppcms::application > > { > > public: > > > > Home _home; > > Test _test; > > > > App(cppcms::service &s) > > : cppcms::application(s) > > , _home(s) > > , _test(s) > > { > > add(_test, "/test", 1); > > add(_home, "/home", 2); > > } > > }; > > > > > > > > int main(int argc,char ** argv) > > { > > try > > { > > cppcms::service srv(argc, argv); > > srv.applications_pool().mount(cppcms::applications_factory<App>()); > > srv.run(); > > } > > catch(std::exception const &e) > > { > > std::cerr<<e.what()<<std::endl; > > } > > } > > > > But when I’d tried access like: > > > > http://localhost:8080/test > > or > > http://localhost:8080/home > > > > Don’t work, What is wrong? > > > > My config file: > > > > { > > > > "service" : { > > "api" : "http", > > "port" : 8080, > > "worker_threads" : 20, > > > > }, > > "http" : { > > "script" : "/" > > }, > > "file_server" : { > > "enable" : true > > }, > > "session" : { > > "expire" : "renew", > > "timeout" : 604800, > > "location" : "client", > > "client" : { > > "encryptor" : "hmac", > > "key" : > "232074faa0fd37de20858bf8cd0a7d04" > > } > > }, > > } > > > > Thaks > > ------------------------------------------------------------------------------ > Enable your software for Intel(R) Active Management Technology to meet the > growing manageability and security demands of your customers. Businesses > are taking advantage of Intel(R) vPro (TM) technology - will your software > be a part of the solution? Download the Intel(R) Manageability Checker > today! http://p.sf.net/sfu/intel-dev2devmar > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > |
From: Pavel K. <un...@fu...> - 2011-03-25 14:43:24
|
try more recent version ;) commit from Wed Feb 2 19:15:37 2011 UTC http://cppcms.svn.sourceforge.net/viewvc/cppcms/framework/trunk/cppcms/application.h?r1=1671&r2=1672 On Friday 25 March 2011, Renato Forti wrote: > Hi Thanks again, > Well, my cppcms::application have 2 attachs: > > > > void attach(application *app); > > void attach(application *app,std::string regex,int part); |
From: Renato F. <re....@ay...> - 2011-03-25 14:30:35
|
Hi Thanks again, Well, my cppcms::application have 2 attachs: void attach(application *app); void attach(application *app,std::string regex,int part); then Id try: class App : public cppcms::application { public: App(cppcms::service &s) : cppcms::application(s) { attach( new Test( s ), "test", "/test{1}", "/test((/.*)?)", 1 ); attach( new Portal( s ), "portal", "/portal{1}", "/portal((/.*)?)", 1 ); } }; But I receive this error of compiler: 1>e:\project.vgsws\main.cpp(362) : error C2661: 'cppcms::application::attach' : no overloaded function takes 5 arguments 1>e:\project.vgsws\main.cpp(367) : error C2661: 'cppcms::application::attach' : no overloaded function takes 5 arguments I am using: cppcms-0.99.6 I am confusing in how use a class to represent an Page/URL. Thanks for help. De: Pavel Kropitz [mailto:un...@fu...] Enviada em: sexta-feira, 25 de março de 2011 10:51 Para: cpp...@li... Assunto: Re: [Cppcms-users] URL maps hi, before Artyom gives you more sopisticated answer, look at attach() method (enables generating url - look at blog example). /// Register an application \a app as child and mount it into: /// /// - url_dispatcher calling dispatcher().mount(regex,*app,part); /// - url_mapper calling mapper().mount(name,url,*app); /// /// Ownership of app is transfered to parent. /// void attach(application *app,std::string const &name,std::string const &url,std::string const ®ex,int part); example from my application> attach( new apps::photo( s ), "photo", "/photo{1}", "/photo((/.*)?)", 1 ); attach( new apps::user::app_user( s ), "user", "/user{1}", "/user((/.*)?)", 1 ); pavel. On Friday 25 March 2011, Renato Forti wrote: > Hi, > I am try understand how group and map url. > For sample I have 2 classes: > { > > add(_test, "/test", 1); > > add(_home, "/home", 2); > > } > }; |
From: Pavel K. <un...@fu...> - 2011-03-25 14:20:22
|
and to attach "ending app" without parameters or more possible "views"> welcome::welcome( cppcms::service &srv ) : master_full( srv ) { dispatcher().assign( "/?", &welcome::display, this ); mapper().assign( "" ); } void welcome::display() { } |
From: Pavel K. <un...@fu...> - 2011-03-25 13:50:47
|
hi, before Artyom gives you more sopisticated answer, look at attach() method (enables generating url - look at blog example). /// Register an application \a app as child and mount it into: /// /// - url_dispatcher calling dispatcher().mount(regex,*app,part); /// - url_mapper calling mapper().mount(name,url,*app); /// /// Ownership of app is transfered to parent. /// void attach(application *app,std::string const &name,std::string const &url,std::string const ®ex,int part); example from my application> attach( new apps::photo( s ), "photo", "/photo{1}", "/photo((/.*)?)", 1 ); attach( new apps::user::app_user( s ), "user", "/user{1}", "/user((/.*)?)", 1 ); pavel. On Friday 25 March 2011, Renato Forti wrote: > Hi, > I am try understand how group and map url. > For sample I have 2 classes: > { > > add(_test, "/test", 1); > > add(_home, "/home", 2); > > } > }; |
From: Renato F. <re....@ay...> - 2011-03-25 13:16:14
|
Hi, I am try understand how group and map url. For sample I have 2 classes: class Home : public cppcms::application class Test : public cppcms::application And a class that I can group apps: class App : public cppcms::application { public: Home _home; Test _test; App(cppcms::service &s) : cppcms::application(s) , _home(s) , _test(s) { add(_test, "/test", 1); add(_home, "/home", 2); } }; int main(int argc,char ** argv) { try { cppcms::service srv(argc, argv); srv.applications_pool().mount(cppcms::applications_factory<App>()); srv.run(); } catch(std::exception const &e) { std::cerr<<e.what()<<std::endl; } } But when I'd tried access like: http://localhost:8080/test or http://localhost:8080/home Don't work, What is wrong? My config file: { "service" : { "api" : "http", "port" : 8080, "worker_threads" : 20, }, "http" : { "script" : "/" }, "file_server" : { "enable" : true }, "session" : { "expire" : "renew", "timeout" : 604800, "location" : "client", "client" : { "encryptor" : "hmac", "key" : "232074faa0fd37de20858bf8cd0a7d04" } }, } Thaks |
From: Renato F. <re....@ay...> - 2011-03-24 17:05:52
|
Now Work very well!!! Thanks a lot :0) De: Pavel Kropitz [mailto:un...@fu...] Enviada em: quinta-feira, 24 de março de 2011 12:24 Para: cpp...@li... Assunto: Re: [Cppcms-users] RES: RES: RES: RES: RES: RES: Run on Windows 7 hi, download cppcms from svn. there is blog/ directory - very good, more complex example to study. to config.js you need to add> "file_server" : { "enable" : true, "document_root" : "../" }, http://art-blog.no-ip.info/wikipp/en/page/cppcms_1x_config#file_server.docum ent_root compiled binary (from build/ direcotory) look to upper directory to find files. so in blog example template should look like <link href="/media/style-ltr.css" rel="stylesheet" type="text/css" /> (but you will find, that Artyom did it configurable :) On Thursday 24 March 2011, Renato Forti wrote: > Hi Pavel, Thanks for help. > > Now I using no web server, I am using only CPPCMS. > > > > Sorry my ignorance, but I dont understand what is document root and how > setup this. > > > > Is this: script > > { > > "service" : { > > "api" : "http", > > "port" : 8080 > > }, > > "http" : { > > "script" : "/" > > } > > } > > > > Any help ? Thanks |
From: Pavel K. <un...@fu...> - 2011-03-24 16:40:40
|
ok, it seems that if i want to use it in "automatic way" i need to move it to overloaded render method and in other cases call it manually. i overlook that possibility. it's ellegant too. thanks On Thursday 24 March 2011, Artyom wrote: > The problem is once you request output stream the headers are written and > thus you can't set redirect headers. > > You need to provide headers first (set redirect header or so) > > and then request output stream > > Requesting output stream triggers many things including > headers write and saving session values. > > So instead of > > Use > > > response().set_redirect_header( ... ) > response().out() << booster::locale::as::time_zone( tz ); |
From: Artyom <art...@ya...> - 2011-03-24 16:13:33
|
> >Requesting output stream triggers many things including >headers write and saving session values. > >So instead of > > >Use > > >response().set_redirect_header( ... ) >response().out() << booster::locale::as::time_zone( tz ); > >Artyom I mean --------- So instead of response().out() << booster::locale::as::time_zone( tz ); response().set_redirect_header( ... ) Use response().set_redirect_header( ... ) response().out() << booster::locale::as::time_zone( tz ); Artyom |