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