[Cppcms-users] RES: URL maps
Brought to you by:
artyom-beilis
|
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
|