cppcms-users Mailing List for CppCMS C++ Web Framework (Page 92)
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: Artyom B. <art...@ya...> - 2012-03-27 08:30:26
|
Hello, CppCMS supports both Unix like operating systems and Windows. However using CppCMS (and actually any library) on Windows is not as simple as on OSes like Linux. So I've added a small tutorial that marks the notes about using CppCMS on Windows. http://cppcms.com/wikipp/en/page/notes_for_windows_users Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ |
From: <ele...@ex...> - 2012-03-27 01:25:58
|
> Yes: http://cppcms.com/wikipp/en/page/run_application_web_server_root > > Artyom Thanks! Petr |
From: sergey l. <ccp...@gm...> - 2012-03-26 15:08:58
|
I just added DLL_EXPORT to main project, recompile it and it worked! Thank you very much. On Mon, Mar 26, 2012 at 4:19 PM, Artyom Beilis <art...@ya...> wrote: > >2. I have define DLL_EXPORT in skin. > > No you don't > > grep DLL_EXPORT * > > > does not show any result > > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ > CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: Artyom B. <art...@ya...> - 2012-03-26 12:19:19
|
>2. I have define DLL_EXPORT in skin. No you don't grep DLL_EXPORT * does not show any result Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ |
From: Artyom B. <art...@ya...> - 2012-03-26 12:17:08
|
> > >Now I have inclusion in main project and skin: >Z:\libraries\cppcms\cppcms-1.0.0\build\lib\cppcms-d.lib >Z:\libraries\cppcms\cppcms-1.0.0\build\lib\booster-d.lib >Z:\libraries\cppcms\cppcms-1.0.0\build\lib\libbooster-d.lib > You can't use both booster.lib and libbooster.lib - that is why you get the problem. Fix it. > >Without libbooster-d.lib I can't build nor main project nor skin with error about locale: >1>test_skin.obj : error LNK2001: unresolved external symbol "public: static class std::locale::id booster::locale::base_message_format<char>::id" (?id@?$base_message_format@D@locale@booster@@2V02std@@A) >1>Z:\projects\test\Debug\test_skin.dll : fatal error LNK1120: 1 unresolved externals > Add DLL_EXPORT define to the project (both main program and the DLL) Artyom |
From: sergey l. <ccp...@gm...> - 2012-03-26 12:09:39
|
Now I have inclusion in main project and skin: Z:\libraries\cppcms\cppcms-1.0.0\build\lib\cppcms-d.lib Z:\libraries\cppcms\cppcms-1.0.0\build\lib\booster-d.lib Z:\libraries\cppcms\cppcms-1.0.0\build\lib\libbooster-d.lib Without libbooster-d.lib I can't build nor main project nor skin with error about locale: 1>test_skin.obj : error LNK2001: unresolved external symbol "public: static class std::locale::id booster::locale::base_message_format<char>::id" (?id@ ?$base_message_format@D@locale@booster@@2V02std@@A) 1>Z:\projects\test\Debug\test_skin.dll : fatal error LNK1120: 1 unresolved externals On Mon, Mar 26, 2012 at 4:00 PM, sergey lavrov <ccp...@gm...>wrote: > I recompile cppcms using instruction at > http://cppcms.com/wikipp/en/page/cppcms_1x_build (console cmake, nmake) > but still have problem. > > 1. I use skin.dll. > 2. I have define DLL_EXPORT in skin. > 3. I always link with the same cppcms.lib and booster.lib in exe and in > skin VS projects. It's hardcoded in VS projects file so it's can't be > different. > > > On Mon, Mar 26, 2012 at 12:58 PM, Artyom Beilis <art...@ya...>wrote: > >> Ok, I see.... >> >> (Argggrrr Windows ... ) >> >> >> I compiled the code >> >> g++ -Wall -DDLL_EXPORT=1 test.cpp -lcppcms -lbooster -o test.exe >> >> g++ -Wall -DDLL_EXPORT=1 -shared test_skin2.cpp -lcppcms -lbooster -o >> cygtest_skin.dll >> >> And it works perfectly well :-) >> >> I looked into the project files and found following dependencies: >> >> Z:\libraries\cppcms\cppcms-1.0.0\build\Debug\cppcms.lib >> Z:\libraries\cppcms\cppcms-1.0.0\build\booster\Debug\booster.lib >> Z:\libraries\cppcms\cppcms-1.0.0\build\booster\Debug\libbooster.lib >> >> >> >> cppcms.lib - is import library for cppcms.dll >> >> booster.lib - is import library for booster.dll >> libbooster.lib - is STATIC booster library. >> >> I assume there is a mixup of some symbols. >> >> I assume what happens is that main program and the dll use two different >> versions >> of symbols that is why the localization facets installed in main program >> are not visible in DLL. >> >> >> Two things: >> >> 1. When you use dynamically loaded view you **must** use DLLs >> >> 2. It is good idea to add DLL_EXPORT define to your projects (so you'll >> get correct import symbols >> >> 3. You should always link with cppcms.lib and booster.lib unless you >> create fully statically linked >> projects. >> >> Once you clean all the dependencies as required it would work. >> >> Additional small notes. >> >> Did you build cppcms with nmake files or with MSVC project? >> >> According to the layout it looks like you created it with MSVC >> project instead of nmake. >> >> VS projects are not supported. >> >> Please build cppcms in release and debug mode indepenently >> using CMake + NMake. The reason that there are different >> configurations for debug and release that can't be done >> using VS project. >> >> For example in debug it should be cppcmsd.dll and boosterd.dll >> cppcmsd.lib and boosterd.lib. >> >> It seems that your debug build uses "release" file names. >> >> It may lead to the same mixup as well. >> >> >> Best Regards, >> >> >> Artyom Beilis >> ------------- >> >> Support CppCMS by donating money: >> https://sourceforge.net/donate/index.php?group_id=209965 >> >> >> >> >> >> >> >________________________________ >> > From: sergey lavrov <ccp...@gm...> >> >To: cpp...@li... >> >Sent: Monday, March 26, 2012 10:12 AM >> >Subject: Re: [Cppcms-users] localization problem >> > >> > >> >Hello Artyom! >> > >> > >> >I sent to your email VS project that reproduce such behavior. >> > >> > >> >On Sun, Mar 25, 2012 at 11:12 PM, Artyom Beilis <art...@ya...> >> wrote: >> > >> >Can you create a sample program and send it? >> >> >> >> >> >>Because both methods should work (without -d flag) >> >> >> >>Artyom Beilis >> >>-------------- >> >>CppCMS - C++ Web Framework: http://cppcms.com/ >> >>CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >> >> >> >> >> >> >> >>>________________________________ >> >>> From: sergey lavrov <ccp...@gm...> >> >>>To: cpp...@li... >> >>>Sent: Sunday, March 25, 2012 8:00 PM >> >>>Subject: Re: [Cppcms-users] localization problem >> >>> >> >>> >> >>> >> >>>Hello Artyom! >> >>> >> >>> >> >>>I tried use -d flag as described in wiki >> http://cppcms.com/wikipp/en/page/cppcms_1x_i18n_and_l10n but >> unfortunatly cppcms_tmpl_cc generate the same output as without -d flag. >> >>>I also tried using cppcms version 1.0.1 and 0.999.0 but have the same >> result. >> >>>So I get stuck with it and haven't any ideas. >> >>> >> >>> >> >>>On Sun, Mar 25, 2012 at 6:54 PM, Artyom Beilis <art...@ya...> >> wrote: >> >>> >> >>>Do you use any cppcms_tmpl_cc flags like -d domain? >> >>>>Basically it seems strange. >> >>>> >> >>>> >> >>>> >> >>>> >> >>>>> >> >>>>>On Thu, Mar 22, 2012 at 3:39 PM, sergey lavrov < >> ccp...@gm...> wrote: >> >>>>> >> >>>>>Dear All! >> >>>>>> >> >>>>>> >> >>>>>> >> >>>> >> >>>>>>In controller I have: >> >>>>>>context().locale("ru_RU.UTF-8"); >> >>>>>>render("skin", "test", content); >> >>>>>>response().out() << "test: "<< translate("test"); >> >>>>>> >> >>>>>> >> >>>> >> >>>> >> >>>>Both should work. response().out() should have a proper locale. >> >>>> >> >>>>Artyom >> >>>> >> >> >>>>------------------------------------------------------------------------------ >> >>>>This SF email is sponsosred by: >> >>>>Try Windows Azure free for 90 days Click Here >> >>>>http://p.sf.net/sfu/sfd2d-msazure >> >>>>_______________________________________________ >> >>>>Cppcms-users mailing list >> >>>>Cpp...@li... >> >>>>https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >>>> >> >>> >> >> >>>------------------------------------------------------------------------------ >> >>>This SF email is sponsosred by: >> >>>Try Windows Azure free for 90 days Click Here >> >>>http://p.sf.net/sfu/sfd2d-msazure >> >>>_______________________________________________ >> >>>Cppcms-users mailing list >> >>>Cpp...@li... >> >>>https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >>> >> >>> >> >>> >> >> >>------------------------------------------------------------------------------ >> >>This SF email is sponsosred by: >> >>Try Windows Azure free for 90 days Click Here >> >>http://p.sf.net/sfu/sfd2d-msazure >> >>_______________________________________________ >> >>Cppcms-users mailing list >> >>Cpp...@li... >> >>https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> >> >> >> > >> >> >------------------------------------------------------------------------------ >> >This SF email is sponsosred by: >> >Try Windows Azure free for 90 days Click Here >> >http://p.sf.net/sfu/sfd2d-msazure >> >_______________________________________________ >> >Cppcms-users mailing list >> >Cpp...@li... >> >https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > >> > >> > >> >> >> ------------------------------------------------------------------------------ >> This SF email is sponsosred by: >> Try Windows Azure free for 90 days Click Here >> http://p.sf.net/sfu/sfd2d-msazure >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > > |
From: sergey l. <ccp...@gm...> - 2012-03-26 12:00:25
|
I recompile cppcms using instruction at http://cppcms.com/wikipp/en/page/cppcms_1x_build (console cmake, nmake) but still have problem. 1. I use skin.dll. 2. I have define DLL_EXPORT in skin. 3. I always link with the same cppcms.lib and booster.lib in exe and in skin VS projects. It's hardcoded in VS projects file so it's can't be different. On Mon, Mar 26, 2012 at 12:58 PM, Artyom Beilis <art...@ya...> wrote: > Ok, I see.... > > (Argggrrr Windows ... ) > > > I compiled the code > > g++ -Wall -DDLL_EXPORT=1 test.cpp -lcppcms -lbooster -o test.exe > > g++ -Wall -DDLL_EXPORT=1 -shared test_skin2.cpp -lcppcms -lbooster -o > cygtest_skin.dll > > And it works perfectly well :-) > > I looked into the project files and found following dependencies: > > Z:\libraries\cppcms\cppcms-1.0.0\build\Debug\cppcms.lib > Z:\libraries\cppcms\cppcms-1.0.0\build\booster\Debug\booster.lib > Z:\libraries\cppcms\cppcms-1.0.0\build\booster\Debug\libbooster.lib > > > > cppcms.lib - is import library for cppcms.dll > > booster.lib - is import library for booster.dll > libbooster.lib - is STATIC booster library. > > I assume there is a mixup of some symbols. > > I assume what happens is that main program and the dll use two different > versions > of symbols that is why the localization facets installed in main program > are not visible in DLL. > > > Two things: > > 1. When you use dynamically loaded view you **must** use DLLs > > 2. It is good idea to add DLL_EXPORT define to your projects (so you'll > get correct import symbols > > 3. You should always link with cppcms.lib and booster.lib unless you > create fully statically linked > projects. > > Once you clean all the dependencies as required it would work. > > Additional small notes. > > Did you build cppcms with nmake files or with MSVC project? > > According to the layout it looks like you created it with MSVC > project instead of nmake. > > VS projects are not supported. > > Please build cppcms in release and debug mode indepenently > using CMake + NMake. The reason that there are different > configurations for debug and release that can't be done > using VS project. > > For example in debug it should be cppcmsd.dll and boosterd.dll > cppcmsd.lib and boosterd.lib. > > It seems that your debug build uses "release" file names. > > It may lead to the same mixup as well. > > > Best Regards, > > > Artyom Beilis > ------------- > > Support CppCMS by donating money: > https://sourceforge.net/donate/index.php?group_id=209965 > > > > > > > >________________________________ > > From: sergey lavrov <ccp...@gm...> > >To: cpp...@li... > >Sent: Monday, March 26, 2012 10:12 AM > >Subject: Re: [Cppcms-users] localization problem > > > > > >Hello Artyom! > > > > > >I sent to your email VS project that reproduce such behavior. > > > > > >On Sun, Mar 25, 2012 at 11:12 PM, Artyom Beilis <art...@ya...> > wrote: > > > >Can you create a sample program and send it? > >> > >> > >>Because both methods should work (without -d flag) > >> > >>Artyom Beilis > >>-------------- > >>CppCMS - C++ Web Framework: http://cppcms.com/ > >>CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > >> > >> > >> > >>>________________________________ > >>> From: sergey lavrov <ccp...@gm...> > >>>To: cpp...@li... > >>>Sent: Sunday, March 25, 2012 8:00 PM > >>>Subject: Re: [Cppcms-users] localization problem > >>> > >>> > >>> > >>>Hello Artyom! > >>> > >>> > >>>I tried use -d flag as described in wiki > http://cppcms.com/wikipp/en/page/cppcms_1x_i18n_and_l10n but > unfortunatly cppcms_tmpl_cc generate the same output as without -d flag. > >>>I also tried using cppcms version 1.0.1 and 0.999.0 but have the same > result. > >>>So I get stuck with it and haven't any ideas. > >>> > >>> > >>>On Sun, Mar 25, 2012 at 6:54 PM, Artyom Beilis <art...@ya...> > wrote: > >>> > >>>Do you use any cppcms_tmpl_cc flags like -d domain? > >>>>Basically it seems strange. > >>>> > >>>> > >>>> > >>>> > >>>>> > >>>>>On Thu, Mar 22, 2012 at 3:39 PM, sergey lavrov < > ccp...@gm...> wrote: > >>>>> > >>>>>Dear All! > >>>>>> > >>>>>> > >>>>>> > >>>> > >>>>>>In controller I have: > >>>>>>context().locale("ru_RU.UTF-8"); > >>>>>>render("skin", "test", content); > >>>>>>response().out() << "test: "<< translate("test"); > >>>>>> > >>>>>> > >>>> > >>>> > >>>>Both should work. response().out() should have a proper locale. > >>>> > >>>>Artyom > >>>> > > >>>>------------------------------------------------------------------------------ > >>>>This SF email is sponsosred by: > >>>>Try Windows Azure free for 90 days Click Here > >>>>http://p.sf.net/sfu/sfd2d-msazure > >>>>_______________________________________________ > >>>>Cppcms-users mailing list > >>>>Cpp...@li... > >>>>https://lists.sourceforge.net/lists/listinfo/cppcms-users > >>>> > >>> > > >>>------------------------------------------------------------------------------ > >>>This SF email is sponsosred by: > >>>Try Windows Azure free for 90 days Click Here > >>>http://p.sf.net/sfu/sfd2d-msazure > >>>_______________________________________________ > >>>Cppcms-users mailing list > >>>Cpp...@li... > >>>https://lists.sourceforge.net/lists/listinfo/cppcms-users > >>> > >>> > >>> > > >>------------------------------------------------------------------------------ > >>This SF email is sponsosred by: > >>Try Windows Azure free for 90 days Click Here > >>http://p.sf.net/sfu/sfd2d-msazure > >>_______________________________________________ > >>Cppcms-users mailing list > >>Cpp...@li... > >>https://lists.sourceforge.net/lists/listinfo/cppcms-users > >> > >> > > > > >------------------------------------------------------------------------------ > >This SF email is sponsosred by: > >Try Windows Azure free for 90 days Click Here > >http://p.sf.net/sfu/sfd2d-msazure > >_______________________________________________ > >Cppcms-users mailing list > >Cpp...@li... > >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > > > > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: Artyom B. <art...@ya...> - 2012-03-26 09:24:58
|
>Hi, > >I have an application class BaseApp whose constructor contains: > >attach(new SubApp(s), "subapp", "/{1}", "((\\d+)?)?", 2); > >Why does going to localhost:8080 give me 404 error when the regular >expression in the statement above should direct the request to SubApp? > >The name of the script is myapp. Interestingly, when I go to >localhost:8080/myapp, the SubApp application handles the request >correctly. Can someone explain this please? > Yes: http://cppcms.com/wikipp/en/page/run_application_web_server_root Artyom |
From: Artyom B. <art...@ya...> - 2012-03-26 09:08:37
|
>Hello Artyom! > > >I sent to your email VS project that reproduce such behavior. > Small additional note: why do you use dllmain.cpp? You don't need one everything you need for the dll is included in the generated cpp file. Artyom |
From: Artyom B. <art...@ya...> - 2012-03-26 08:59:03
|
Ok, I see.... (Argggrrr Windows ... ) I compiled the code g++ -Wall -DDLL_EXPORT=1 test.cpp -lcppcms -lbooster -o test.exe g++ -Wall -DDLL_EXPORT=1 -shared test_skin2.cpp -lcppcms -lbooster -o cygtest_skin.dll And it works perfectly well :-) I looked into the project files and found following dependencies: Z:\libraries\cppcms\cppcms-1.0.0\build\Debug\cppcms.lib Z:\libraries\cppcms\cppcms-1.0.0\build\booster\Debug\booster.lib Z:\libraries\cppcms\cppcms-1.0.0\build\booster\Debug\libbooster.lib cppcms.lib - is import library for cppcms.dll booster.lib - is import library for booster.dll libbooster.lib - is STATIC booster library. I assume there is a mixup of some symbols. I assume what happens is that main program and the dll use two different versions of symbols that is why the localization facets installed in main program are not visible in DLL. Two things: 1. When you use dynamically loaded view you **must** use DLLs 2. It is good idea to add DLL_EXPORT define to your projects (so you'll get correct import symbols 3. You should always link with cppcms.lib and booster.lib unless you create fully statically linked projects. Once you clean all the dependencies as required it would work. Additional small notes. Did you build cppcms with nmake files or with MSVC project? According to the layout it looks like you created it with MSVC project instead of nmake. VS projects are not supported. Please build cppcms in release and debug mode indepenently using CMake + NMake. The reason that there are different configurations for debug and release that can't be done using VS project. For example in debug it should be cppcmsd.dll and boosterd.dll cppcmsd.lib and boosterd.lib. It seems that your debug build uses "release" file names. It may lead to the same mixup as well. Best Regards, Artyom Beilis ------------- Support CppCMS by donating money: https://sourceforge.net/donate/index.php?group_id=209965 >________________________________ > From: sergey lavrov <ccp...@gm...> >To: cpp...@li... >Sent: Monday, March 26, 2012 10:12 AM >Subject: Re: [Cppcms-users] localization problem > > >Hello Artyom! > > >I sent to your email VS project that reproduce such behavior. > > >On Sun, Mar 25, 2012 at 11:12 PM, Artyom Beilis <art...@ya...> wrote: > >Can you create a sample program and send it? >> >> >>Because both methods should work (without -d flag) >> >>Artyom Beilis >>-------------- >>CppCMS - C++ Web Framework: http://cppcms.com/ >>CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >> >> >> >>>________________________________ >>> From: sergey lavrov <ccp...@gm...> >>>To: cpp...@li... >>>Sent: Sunday, March 25, 2012 8:00 PM >>>Subject: Re: [Cppcms-users] localization problem >>> >>> >>> >>>Hello Artyom! >>> >>> >>>I tried use -d flag as described in wiki http://cppcms.com/wikipp/en/page/cppcms_1x_i18n_and_l10n but unfortunatly cppcms_tmpl_cc generate the same output as without -d flag. >>>I also tried using cppcms version 1.0.1 and 0.999.0 but have the same result. >>>So I get stuck with it and haven't any ideas. >>> >>> >>>On Sun, Mar 25, 2012 at 6:54 PM, Artyom Beilis <art...@ya...> wrote: >>> >>>Do you use any cppcms_tmpl_cc flags like -d domain? >>>>Basically it seems strange. >>>> >>>> >>>> >>>> >>>>> >>>>>On Thu, Mar 22, 2012 at 3:39 PM, sergey lavrov <ccp...@gm...> wrote: >>>>> >>>>>Dear All! >>>>>> >>>>>> >>>>>> >>>> >>>>>>In controller I have: >>>>>>context().locale("ru_RU.UTF-8"); >>>>>>render("skin", "test", content); >>>>>>response().out() << "test: "<< translate("test"); >>>>>> >>>>>> >>>> >>>> >>>>Both should work. response().out() should have a proper locale. >>>> >>>>Artyom >>>> >>>>------------------------------------------------------------------------------ >>>>This SF email is sponsosred by: >>>>Try Windows Azure free for 90 days Click Here >>>>http://p.sf.net/sfu/sfd2d-msazure >>>>_______________________________________________ >>>>Cppcms-users mailing list >>>>Cpp...@li... >>>>https://lists.sourceforge.net/lists/listinfo/cppcms-users >>>> >>> >>>------------------------------------------------------------------------------ >>>This SF email is sponsosred by: >>>Try Windows Azure free for 90 days Click Here >>>http://p.sf.net/sfu/sfd2d-msazure >>>_______________________________________________ >>>Cppcms-users mailing list >>>Cpp...@li... >>>https://lists.sourceforge.net/lists/listinfo/cppcms-users >>> >>> >>> >>------------------------------------------------------------------------------ >>This SF email is sponsosred by: >>Try Windows Azure free for 90 days Click Here >>http://p.sf.net/sfu/sfd2d-msazure >>_______________________________________________ >>Cppcms-users mailing list >>Cpp...@li... >>https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> > >------------------------------------------------------------------------------ >This SF email is sponsosred by: >Try Windows Azure free for 90 days Click Here >http://p.sf.net/sfu/sfd2d-msazure >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
From: sergey l. <ccp...@gm...> - 2012-03-26 08:12:27
|
Hello Artyom! I sent to your email VS project that reproduce such behavior. On Sun, Mar 25, 2012 at 11:12 PM, Artyom Beilis <art...@ya...> wrote: > Can you create a sample program and send it? > > Because both methods should work (without -d flag) > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ > CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > > ------------------------------ > *From:* sergey lavrov <ccp...@gm...> > *To:* cpp...@li... > *Sent:* Sunday, March 25, 2012 8:00 PM > *Subject:* Re: [Cppcms-users] localization problem > > Hello Artyom! > > I tried use -d flag as described in wiki > http://cppcms.com/wikipp/en/page/cppcms_1x_i18n_and_l10n but > unfortunatly cppcms_tmpl_cc generate the same output as without -d flag. > I also tried using cppcms version 1.0.1 and 0.999.0 but have the same > result. > So I get stuck with it and haven't any ideas. > > On Sun, Mar 25, 2012 at 6:54 PM, Artyom Beilis <art...@ya...>wrote: > > Do you use any cppcms_tmpl_cc flags like -d domain? > Basically it seems strange. > > > > > > >On Thu, Mar 22, 2012 at 3:39 PM, sergey lavrov <ccp...@gm...> > wrote: > > > >Dear All! > >> > >> > >> > >>In controller I have: > >>context().locale("ru_RU.UTF-8"); > >>render("skin", "test", content); > >>response().out() << "test: "<< translate("test"); > >> > >> > > > Both should work. response().out() should have a proper locale. > > Artyom > > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > |
From: <ele...@ex...> - 2012-03-26 01:49:20
|
Hi, I have an application class BaseApp whose constructor contains: attach(new SubApp(s), "subapp", "/{1}", "((\\d+)?)?", 2); Why does going to localhost:8080 give me 404 error when the regular expression in the statement above should direct the request to SubApp? The name of the script is myapp. Interestingly, when I go to localhost:8080/myapp, the SubApp application handles the request correctly. Can someone explain this please? Thanks |
From: Artyom B. <art...@ya...> - 2012-03-25 19:15:21
|
> >viewName1.cpp: viewName1.tmpl model1.h >cppcms_tmpl_cc $< -o $@ > You compile only viewName1.tmpl to the view. It should be cppcms_tmpl_cc view_a.tmpl view_b.tmpl view_c.tmpl -o someskin.cpp So you actually do not get the viewName2.tmpl compiled in :-) Artyom |
From: Artyom B. <art...@ya...> - 2012-03-25 19:13:06
|
Can you create a sample program and send it? Because both methods should work (without -d flag) Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: sergey lavrov <ccp...@gm...> >To: cpp...@li... >Sent: Sunday, March 25, 2012 8:00 PM >Subject: Re: [Cppcms-users] localization problem > > >Hello Artyom! > > >I tried use -d flag as described in wiki http://cppcms.com/wikipp/en/page/cppcms_1x_i18n_and_l10n but unfortunatly cppcms_tmpl_cc generate the same output as without -d flag. >I also tried using cppcms version 1.0.1 and 0.999.0 but have the same result. >So I get stuck with it and haven't any ideas. > > >On Sun, Mar 25, 2012 at 6:54 PM, Artyom Beilis <art...@ya...> wrote: > >Do you use any cppcms_tmpl_cc flags like -d domain? >>Basically it seems strange. >> >> >> >> >>> >>>On Thu, Mar 22, 2012 at 3:39 PM, sergey lavrov <ccp...@gm...> wrote: >>> >>>Dear All! >>>> >>>> >>>> >> >>>>In controller I have: >>>>context().locale("ru_RU.UTF-8"); >>>>render("skin", "test", content); >>>>response().out() << "test: "<< translate("test"); >>>> >>>> >> >> >>Both should work. response().out() should have a proper locale. >> >>Artyom >> >>------------------------------------------------------------------------------ >>This SF email is sponsosred by: >>Try Windows Azure free for 90 days Click Here >>http://p.sf.net/sfu/sfd2d-msazure >>_______________________________________________ >>Cppcms-users mailing list >>Cpp...@li... >>https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > >------------------------------------------------------------------------------ >This SF email is sponsosred by: >Try Windows Azure free for 90 days Click Here >http://p.sf.net/sfu/sfd2d-msazure >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
From: sergey l. <ccp...@gm...> - 2012-03-25 18:00:57
|
Hello Artyom! I tried use -d flag as described in wiki http://cppcms.com/wikipp/en/page/cppcms_1x_i18n_and_l10n but unfortunatly cppcms_tmpl_cc generate the same output as without -d flag. I also tried using cppcms version 1.0.1 and 0.999.0 but have the same result. So I get stuck with it and haven't any ideas. On Sun, Mar 25, 2012 at 6:54 PM, Artyom Beilis <art...@ya...> wrote: > Do you use any cppcms_tmpl_cc flags like -d domain? > Basically it seems strange. > > > > > > >On Thu, Mar 22, 2012 at 3:39 PM, sergey lavrov <ccp...@gm...> > wrote: > > > >Dear All! > >> > >> > >> > >>In controller I have: > >>context().locale("ru_RU.UTF-8"); > >>render("skin", "test", content); > >>response().out() << "test: "<< translate("test"); > >> > >> > > > Both should work. response().out() should have a proper locale. > > Artyom > > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: Artyom B. <art...@ya...> - 2012-03-25 15:06:26
|
Please show how do you build the skin? i.e. cppcms_tmp_cc command and link command how do you link the compiled object. Artyom >________________________________ > From: Jan Vlasak <jan...@gm...> >To: Artyom Beilis <art...@ya...>; cpp...@li... >Sent: Saturday, March 24, 2012 12:35 PM >Subject: Re: [Cppcms-users] View skin > > >Hi, > > >I have checked the error logs for apache and the error from the rendering is cppcms, error: Caught exception [cppcms::views::pool: no such view viewName1 in the skin skinName] > > >I have even put config value for default skin into config.js like this. > > > "views" : { > "default_skin" : "skinName" > } > > >But still nothing. the same error is produced... > > >Any idea. > > >Thanks, > > >Jan > >On Thu, Mar 22, 2012 at 2:17 PM, Jan Vlasak <jan...@gm...> wrote: > >Thanks for the reply, >> >> >>What I am trying to do is group view into one namespace (skin). >>My code is: >> >> >>view 1 >>--------------------------------------------------- >><% c++ #include "model1.h" %> >><% xhtml %> >><% skin skinName %> >><% view viewName1 uses Model1 %> >><% template render() %> >>......... >><% end template %> >><% end view %> >><% end skin %> >> >> >> >> >>view 2 >>----------------------------------------------------- >><% c++ #include "model2.h" %> >><% xhtml %> >><% skin skinName %> >><% view viewName2 uses Model2 %> >><% template render() %> >>......... >><% end template %> >><% end view %> >><% end skin %> >> >> >> >> >>rendering / invocation >>--------------------------------------------------------------- >> >> >>Model1 model1; >>render("skinName", "viewName1", model1); >> >> >>and >> >> >>Model2 mode2l; >>render("skinName", "viewName2", model2); >> >> >>each of those are invoked at different point of execution path not in the same function. >> >> >>This implementation produces empty screen and as soon as I change the skin name to be different for each view, it is fine. >> >> >>Any suggestions? >> >> >>Thanks, guys. >> >>Jan >> >> >> >> >>On Wed, Mar 21, 2012 at 8:13 AM, Artyom Beilis <art...@ya...> wrote: >> >> >>> >>> >>>> Thanks for response. >>>> I have tried it with the same skin name across all views, >>>> but It just does not produce anything. >>> >>>Each cppcms template compilation unit should have its own skin name. It is actually >>>namespace - the module. >>> >>>You should for course have different view names (classes) withing the same skin but >>>view names can be shared between different skins (namespaces) >>> >>>You can define skin name by two methods: >>> >>>- using <% skin NAME %> >>>- using -s NAME flag for cppcms_tmpl_cc >>> >>> >>> >>>> >>> >>>> As soon as I supply different name for each view, it works fine. >>> >>>Can you show the code - the pattern you use >>> >>> >>> >>>> Should I include the skin name in the config.js or ... ? >>> >>>If you create **dynamically loadable** view than yes, if >>> >>>it is statically linked then: >>> >>>If you have multiple skins you man need to define only >>> the default one >>> >>> >>> >>>> I cannot really see what is wrong as the views are >>>> working fine with distinct skin names. >>>> >>> >>>Each compilation unit created by cppcms_tmpl_cc should have distinct skin names >>> >>> >>>> >>>>Any suggestions. >>>>Thanks, >>>> >>>> >>> >>>More pointers: >>> >>> >>>http://cppcms.com/wikipp/en/page/cppcms_1x_tut_hello_templates >>>http://cppcms.com/wikipp/en/page/cppcms_1x_tut_templates_inheritance >>>http://cppcms.com/wikipp/en/page/cppcms_1x_templates_gen >>>http://cppcms.com/wikipp/en/page/cppcms_1x_config#views >>>Artyom Beilis >>> >>> >>>------------------------------------------------------------------------------ >>>This SF email is sponsosred by: >>>Try Windows Azure free for 90 days Click Here >>>http://p.sf.net/sfu/sfd2d-msazure >>>_______________________________________________ >>>Cppcms-users mailing list >>>Cpp...@li... >>>https://lists.sourceforge.net/lists/listinfo/cppcms-users >>> >> >> >> >> >>-- >>Jan Vlasak >> >>Flat 2 >>39 Hurst Lane >>Birmingham >>B34 7HS >>ph.:+44 754 6124920 >> > > > >-- >Jan Vlasak > >Flat 2 >39 Hurst Lane >Birmingham >B34 7HS >ph.:+44 754 6124920 > >------------------------------------------------------------------------------ >This SF email is sponsosred by: >Try Windows Azure free for 90 days Click Here >http://p.sf.net/sfu/sfd2d-msazure >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
From: Artyom B. <art...@ya...> - 2012-03-25 14:55:05
|
Do you use any cppcms_tmpl_cc flags like -d domain? Basically it seems strange. > >On Thu, Mar 22, 2012 at 3:39 PM, sergey lavrov <ccp...@gm...> wrote: > >Dear All! >> >> >> >>In controller I have: >>context().locale("ru_RU.UTF-8"); >>render("skin", "test", content); >>response().out() << "test: "<< translate("test"); >> >> Both should work. response().out() should have a proper locale. Artyom |
From: Jan V. <jan...@ap...> - 2012-03-24 10:37:21
|
---------- Forwarded message ---------- From: Jan Vlasak <jan...@gm...> Date: Sat, Mar 24, 2012 at 10:35 AM Subject: Re: [Cppcms-users] View skin To: Artyom Beilis <art...@ya...>, cpp...@li... Hi, I have checked the error logs for apache and the error from the rendering is cppcms, error: Caught exception [cppcms::views::pool: no such view viewName1 in the skin skinName] I have even put config value for default skin into config.js like this. "views" : { "default_skin" : "skinName" } But still nothing. the same error is produced... Any idea. Thanks, Jan On Thu, Mar 22, 2012 at 2:17 PM, Jan Vlasak <jan...@gm...> wrote: > Thanks for the reply, > > What I am trying to do is group view into one namespace (skin). > My code is: > > view 1 > --------------------------------------------------- > <% c++ #include "model1.h" %> > <% xhtml %> > <% skin skinName %> > <% view viewName1 uses Model1 %> > <% template render() %> > ......... > <% end template %> > <% end view %> > <% end skin %> > > > view 2 > ----------------------------------------------------- > <% c++ #include "model2.h" %> > <% xhtml %> > <% skin skinName %> > <% view viewName2 uses Model2 %> > <% template render() %> > ......... > <% end template %> > <% end view %> > <% end skin %> > > > rendering / invocation > --------------------------------------------------------------- > > Model1 model1; > render("skinName", "viewName1", model1); > > and > > Model2 mode2l; > render("skinName", "viewName2", model2); > > each of those are invoked at different point of execution path not in the > same function. > > This implementation produces empty screen and as soon as I change the skin > name to be different for each view, it is fine. > > Any suggestions? > > Thanks, guys. > > Jan > > > On Wed, Mar 21, 2012 at 8:13 AM, Artyom Beilis <art...@ya...>wrote: > >> >> >> >> > Thanks for response. >> > I have tried it with the same skin name across all views, >> > but It just does not produce anything. >> >> Each cppcms template compilation unit should have its own skin name. It >> is actually >> namespace - the module. >> >> You should for course have different view names (classes) withing the >> same skin but >> view names can be shared between different skins (namespaces) >> >> You can define skin name by two methods: >> >> - using <% skin NAME %> >> - using -s NAME flag for cppcms_tmpl_cc >> >> >> > >> >> > As soon as I supply different name for each view, it works fine. >> >> Can you show the code - the pattern you use >> >> >> > Should I include the skin name in the config.js or ... ? >> >> If you create **dynamically loadable** view than yes, if >> >> it is statically linked then: >> >> If you have multiple skins you man need to define only >> the default one >> >> >> > I cannot really see what is wrong as the views are >> > working fine with distinct skin names. >> > >> >> Each compilation unit created by cppcms_tmpl_cc should have distinct skin >> names >> >> >> > >> >Any suggestions. >> >Thanks, >> > >> > >> >> More pointers: >> >> >> http://cppcms.com/wikipp/en/page/cppcms_1x_tut_hello_templates >> http://cppcms.com/wikipp/en/page/cppcms_1x_tut_templates_inheritance >> http://cppcms.com/wikipp/en/page/cppcms_1x_templates_gen >> http://cppcms.com/wikipp/en/page/cppcms_1x_config#views >> Artyom Beilis >> >> >> ------------------------------------------------------------------------------ >> This SF email is sponsosred by: >> Try Windows Azure free for 90 days Click Here >> http://p.sf.net/sfu/sfd2d-msazure >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > > > > -- > Jan Vlasak > > Flat 2 > 39 Hurst Lane > Birmingham > B34 7HS > ph.:+44 754 6124920 > -- Jan Vlasak Flat 2 39 Hurst Lane Birmingham B34 7HS ph.:+44 754 6124920 |
From: Jan V. <jan...@gm...> - 2012-03-24 10:35:48
|
Hi, I have checked the error logs for apache and the error from the rendering is cppcms, error: Caught exception [cppcms::views::pool: no such view viewName1 in the skin skinName] I have even put config value for default skin into config.js like this. "views" : { "default_skin" : "skinName" } But still nothing. the same error is produced... Any idea. Thanks, Jan On Thu, Mar 22, 2012 at 2:17 PM, Jan Vlasak <jan...@gm...> wrote: > Thanks for the reply, > > What I am trying to do is group view into one namespace (skin). > My code is: > > view 1 > --------------------------------------------------- > <% c++ #include "model1.h" %> > <% xhtml %> > <% skin skinName %> > <% view viewName1 uses Model1 %> > <% template render() %> > ......... > <% end template %> > <% end view %> > <% end skin %> > > > view 2 > ----------------------------------------------------- > <% c++ #include "model2.h" %> > <% xhtml %> > <% skin skinName %> > <% view viewName2 uses Model2 %> > <% template render() %> > ......... > <% end template %> > <% end view %> > <% end skin %> > > > rendering / invocation > --------------------------------------------------------------- > > Model1 model1; > render("skinName", "viewName1", model1); > > and > > Model2 mode2l; > render("skinName", "viewName2", model2); > > each of those are invoked at different point of execution path not in the > same function. > > This implementation produces empty screen and as soon as I change the skin > name to be different for each view, it is fine. > > Any suggestions? > > Thanks, guys. > > Jan > > > On Wed, Mar 21, 2012 at 8:13 AM, Artyom Beilis <art...@ya...>wrote: > >> >> >> >> > Thanks for response. >> > I have tried it with the same skin name across all views, >> > but It just does not produce anything. >> >> Each cppcms template compilation unit should have its own skin name. It >> is actually >> namespace - the module. >> >> You should for course have different view names (classes) withing the >> same skin but >> view names can be shared between different skins (namespaces) >> >> You can define skin name by two methods: >> >> - using <% skin NAME %> >> - using -s NAME flag for cppcms_tmpl_cc >> >> >> > >> >> > As soon as I supply different name for each view, it works fine. >> >> Can you show the code - the pattern you use >> >> >> > Should I include the skin name in the config.js or ... ? >> >> If you create **dynamically loadable** view than yes, if >> >> it is statically linked then: >> >> If you have multiple skins you man need to define only >> the default one >> >> >> > I cannot really see what is wrong as the views are >> > working fine with distinct skin names. >> > >> >> Each compilation unit created by cppcms_tmpl_cc should have distinct skin >> names >> >> >> > >> >Any suggestions. >> >Thanks, >> > >> > >> >> More pointers: >> >> >> http://cppcms.com/wikipp/en/page/cppcms_1x_tut_hello_templates >> http://cppcms.com/wikipp/en/page/cppcms_1x_tut_templates_inheritance >> http://cppcms.com/wikipp/en/page/cppcms_1x_templates_gen >> http://cppcms.com/wikipp/en/page/cppcms_1x_config#views >> Artyom Beilis >> >> >> ------------------------------------------------------------------------------ >> This SF email is sponsosred by: >> Try Windows Azure free for 90 days Click Here >> http://p.sf.net/sfu/sfd2d-msazure >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > > > > -- > Jan Vlasak > > Flat 2 > 39 Hurst Lane > Birmingham > B34 7HS > ph.:+44 754 6124920 > -- Jan Vlasak Flat 2 39 Hurst Lane Birmingham B34 7HS ph.:+44 754 6124920 |
From: Jan V. <jan...@gm...> - 2012-03-22 14:17:43
|
Thanks for the reply, What I am trying to do is group view into one namespace (skin). My code is: view 1 --------------------------------------------------- <% c++ #include "model1.h" %> <% xhtml %> <% skin skinName %> <% view viewName1 uses Model1 %> <% template render() %> ......... <% end template %> <% end view %> <% end skin %> view 2 ----------------------------------------------------- <% c++ #include "model2.h" %> <% xhtml %> <% skin skinName %> <% view viewName2 uses Model2 %> <% template render() %> ......... <% end template %> <% end view %> <% end skin %> rendering / invocation --------------------------------------------------------------- Model1 model1; render("skinName", "viewName1", model1); and Model2 mode2l; render("skinName", "viewName2", model2); each of those are invoked at different point of execution path not in the same function. This implementation produces empty screen and as soon as I change the skin name to be different for each view, it is fine. Any suggestions? Thanks, guys. Jan On Wed, Mar 21, 2012 at 8:13 AM, Artyom Beilis <art...@ya...> wrote: > > > > > Thanks for response. > > I have tried it with the same skin name across all views, > > but It just does not produce anything. > > Each cppcms template compilation unit should have its own skin name. It is > actually > namespace - the module. > > You should for course have different view names (classes) withing the same > skin but > view names can be shared between different skins (namespaces) > > You can define skin name by two methods: > > - using <% skin NAME %> > - using -s NAME flag for cppcms_tmpl_cc > > > > > > > As soon as I supply different name for each view, it works fine. > > Can you show the code - the pattern you use > > > > Should I include the skin name in the config.js or ... ? > > If you create **dynamically loadable** view than yes, if > > it is statically linked then: > > If you have multiple skins you man need to define only > the default one > > > > I cannot really see what is wrong as the views are > > working fine with distinct skin names. > > > > Each compilation unit created by cppcms_tmpl_cc should have distinct skin > names > > > > > >Any suggestions. > >Thanks, > > > > > > More pointers: > > > http://cppcms.com/wikipp/en/page/cppcms_1x_tut_hello_templates > http://cppcms.com/wikipp/en/page/cppcms_1x_tut_templates_inheritance > http://cppcms.com/wikipp/en/page/cppcms_1x_templates_gen > http://cppcms.com/wikipp/en/page/cppcms_1x_config#views > Artyom Beilis > > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > -- Jan Vlasak Flat 2 39 Hurst Lane Birmingham B34 7HS ph.:+44 754 6124920 |
From: sergey l. <ccp...@gm...> - 2012-03-22 13:12:54
|
I think the main reason why skin's string not translated because of cppcms_tmpl_cc translate skin code to cppcms::locale::translate and locale structures in cppcms::locale not initialized but context().locale function. In controller I use cppcms::application::translate that proper initizalized by context().locale call. So can someone help me how to proper using localization from skin/view? Thanks in advance! On Thu, Mar 22, 2012 at 3:39 PM, sergey lavrov <ccp...@gm...>wrote: > Dear All! > > cppcms: 1.0.0 > os: windows 7 x86_64 > compiler: VS2010 > > I have strange problem with localization in skin and there is no problem > If I call translate from controller. > > In controller I have: > context().locale("ru_RU.UTF-8"); > render("skin", "test", content); > response().out() << "test: "<< translate("test"); > > In locale\ru\LC_MESSAGES\test.po I have: > msgid "" > msgstr "" > "Content-Type: text/plain; charset=utf-8\n" > "Content-Transfer-Encoding: 8bit\n" > msgid "test" > msgstr "ТЕСТ" > > In skin I have: <% gt "test" %> and cppcms_tmpl_cc produce code: > #line 116 "skin.tmpl" > out()<<cppcms::locale::translate("test"); > > I get untranslated skin's string and I get translated controller's string > in browser output. > > Thanks in advance! > > |
From: sergey l. <ccp...@gm...> - 2012-03-22 11:39:52
|
Dear All! cppcms: 1.0.0 os: windows 7 x86_64 compiler: VS2010 I have strange problem with localization in skin and there is no problem If I call translate from controller. In controller I have: context().locale("ru_RU.UTF-8"); render("skin", "test", content); response().out() << "test: "<< translate("test"); In locale\ru\LC_MESSAGES\test.po I have: msgid "" msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" msgid "test" msgstr "ТЕСТ" In skin I have: <% gt "test" %> and cppcms_tmpl_cc produce code: #line 116 "skin.tmpl" out()<<cppcms::locale::translate("test"); I get untranslated skin's string and I get translated controller's string in browser output. Thanks in advance! |
From: william l. <we...@gm...> - 2012-03-21 12:26:56
|
Hi, the use case behind this problem is: we will have a real website, which is HTTPS. Also, we will have a local app running with embedded HTTPS service. The real HTTPS website page will use JSONP to request local embedded HTTPS server for local machine specific datas. We cannot use local HTTP server to handle the JSONP, because it is not allowed to JSONP from HTTPS to HTTP. It will pop up mix content warning every time when request :( thanks, William L. On Wed, Mar 21, 2012 at 8:17 PM, Marcel Hellwig <ke...@co...> wrote: > Am 21.03.2012 13:08, schrieb william lee: > > Hi, > > I read the roadmap of CppCMS, it looks like current version's embedded > > web server does not support HTTPS. > > http://cppcms.com/wikipp/en/page/cppcms_1x_tasks#Implement.HTTPS.support > > I have a basic question regarding that. > > > > For example, if a website support HTTPS. Then it should use SSL > > certificate, and signed, verified by 3rd organization, like Verisign. > > And this SSL should bind to domain. > > We can create self signed security, but browser will pop up a SSL > > warning page/dialog while loading the https site. > > > > The question is, what if I want to create a embedded HTTPS server, > > running on localhost and accept request from localhost. > > How can I provide the certificate to this HTTPs site? I guess > > Verisign will not provide any ssl info bind to Localhost domain:) > > So how can I make sure web browser request to localhost:443 via HTTPS > > will not pop up SSL warning page/dialog? > > > > Thanks, > > William L. > afaik there is no solution. Localhost is a virtual domain of the > loopback device. > In Firefox e.g. you only have once to accept this warning and then it > never shows up. Why is it so important for you, that now warning is > displayed? If you are running it on your localhost, nobody else can > access to it. > > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: Artyom B. <art...@ya...> - 2012-03-21 12:20:30
|
> For example, if a website support HTTPS. > Then it should use SSL certificate, and signed, > verified by 3rd organization, like Verisign. And > this SSL should bind to domain. > We can create self signed security, but browser > will pop up a SSL warning page/dialog while loading > the https site. > HTTPS for embedded devices is mostly requred for a secure communication withing some private network. Generally these sertificates are handled on per-server basis and explicitly allowed by the users. > > The question is, what if I want to create a embedded > HTTPS server, running on localhost and accept request from localhost. > It has not much sence to use SSL on "localhost" :-). > How can I provide the certificate to this HTTPs site? > I guess Verisign will not provide any ssl info bind to Localhost domain:) > So how can I make sure web browser request to localhost:443 via HTTPS will > not pop up SSL warning page/dialog? > Generally "SSL Warning" would pop only first time and if you add an exception you should not have problems in future. Basically you register the sertificate on per "web-site" basis, I assume there are some more solutions avalible. I'd recommend you to search about it on the web. This has nothing to do with CppCMS as you would have exactly the same problem with any local web server: Apache, Lighttpd, Nginx or IIS. Artyom Beilis ------------- Support CppCMS by donating money: https://sourceforge.net/donate/index.php?group_id=209965 |
From: Marcel H. <ke...@co...> - 2012-03-21 12:17:45
|
Am 21.03.2012 13:08, schrieb william lee: > Hi, > I read the roadmap of CppCMS, it looks like current version's embedded > web server does not support HTTPS. > http://cppcms.com/wikipp/en/page/cppcms_1x_tasks#Implement.HTTPS.support > I have a basic question regarding that. > > For example, if a website support HTTPS. Then it should use SSL > certificate, and signed, verified by 3rd organization, like Verisign. > And this SSL should bind to domain. > We can create self signed security, but browser will pop up a SSL > warning page/dialog while loading the https site. > > The question is, what if I want to create a embedded HTTPS server, > running on localhost and accept request from localhost. > How can I provide the certificate to this HTTPs site? I guess > Verisign will not provide any ssl info bind to Localhost domain:) > So how can I make sure web browser request to localhost:443 via HTTPS > will not pop up SSL warning page/dialog? > > Thanks, > William L. afaik there is no solution. Localhost is a virtual domain of the loopback device. In Firefox e.g. you only have once to accept this warning and then it never shows up. Why is it so important for you, that now warning is displayed? If you are running it on your localhost, nobody else can access to it. |