[Cppcms-users] session question about cppcms
Brought to you by:
artyom-beilis
|
From: 陈抒 <csf...@gm...> - 2011-11-20 09:56:43
|
Hello,
I try to save an email address of current user into session after he logs
into web server correctly.Here is my codes:
...
this->session()["email"]=user->email;
BOOSTER_INFO("hello") <<"session has email now:"<<this->session()["email"];
...
Then I refresh the page,and debug into my application,but can't find the
email from session
void hello::welcome(std::string url){
BOOSTER_INFO("hello") << "Enter welcome function";
if(session().is_set("email")){
string email = this->session().get(string("email"));
c_.email = email;
}
render("my_skin","message",c_);
}
session().is_set("email") returns false;
My session configuration looks like so:
"session" : {
"expire" : "renew",
"timeout" : 600,
"location" : "server",
"server":{
"storage":"memory"
}
}
陈抒
Best regards
http://blog.csdn.net/sheismylife
|