R
Robert Gleeson
Hi everybody,
I am making an AJAX call to login.rhtml, in login.rhtml a new session is
created, and then I use javascript to reload the page to
/interface/index.rhtml where i attempt to continue the session created
in login.rhtml but everytime I do this I get an ArgumentError(from what
ive read means no session exists.) I am using mod_ruby/eruby to do
this.. The code I am using is posted below :
-- login.rhtml --
session = CGI::Session.new(cgiObject,'database_manager' =>
CGI::Session:Store,
'session_key' => '_rb_sess_id',
'session_expires' => Time.now + 30 * 60,
'prefix' => 'sessions_pstore',
'new_session' => true)
session['username'] = cgiObject['username']
session.update
session.close
-- interface/index.rhtml --
session = CGI::Session.new(cgiObject,'database_manager' =>
CGI::Session:Store,
'session_key' => '_rb_sess_id',
'prefix' => 'sessions_pstore'
'new_session' => false )
puts session['username']
I am making an AJAX call to login.rhtml, in login.rhtml a new session is
created, and then I use javascript to reload the page to
/interface/index.rhtml where i attempt to continue the session created
in login.rhtml but everytime I do this I get an ArgumentError(from what
ive read means no session exists.) I am using mod_ruby/eruby to do
this.. The code I am using is posted below :
-- login.rhtml --
session = CGI::Session.new(cgiObject,'database_manager' =>
CGI::Session:Store,
'session_key' => '_rb_sess_id',
'session_expires' => Time.now + 30 * 60,
'prefix' => 'sessions_pstore',
'new_session' => true)
session['username'] = cgiObject['username']
session.update
session.close
-- interface/index.rhtml --
session = CGI::Session.new(cgiObject,'database_manager' =>
CGI::Session:Store,
'session_key' => '_rb_sess_id',
'prefix' => 'sessions_pstore'
'new_session' => false )
puts session['username']