Can I use session obj without cookie support in browser?

23 views
Skip to first unread message

GD

unread,
Aug 31, 2010, 4:12:07 AM8/31/10
to Ruby on Rails: Talk
Hi, guys:

I want to use the session object in the rails, but the browser has
disabled the cookie support. I store some string into the session obj,
but I can't retrieve the string value in another page.

In there any solution to solve the problem?

I have tried add the following code on Application_Controller to store
my session into database, but it doesn't work. I still can't get the
string value in the session obj.

I have tried add the following code on Application_Controller to store
my session into database.

ActionController::Base.session_store = :active_record_store

Hassan Schroeder

unread,
Aug 31, 2010, 12:38:00 PM8/31/10
to rubyonra...@googlegroups.com
On Tue, Aug 31, 2010 at 1:12 AM, GD <gongd...@gmail.com> wrote:

> I want to use the session object in the rails, but the browser has
> disabled the cookie support. I store some string into the session obj,
> but I can't retrieve the string value in another page.

Possibly helpful:

http://oldwiki.rubyonrails.org/rails/pages/HowToMaintainSessionWhenCookiesAreNotAllowed

--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
twitter: @hassan

GD

unread,
Sep 1, 2010, 2:05:31 AM9/1/10
to Ruby on Rails: Talk
Hi:

Thanks your reply very much. But The "Hidden Field Session" project is
not available.

I think that is it possible to append the session_id on the URL, and
my rails
program can get the session object by the session_id sent from
previous page?

It is like the JSP to rewrite the URL and append the jsessionid.

On 9月1日, 上午12時38分, Hassan Schroeder <hassan.schroe...@gmail.com>
wrote:
> On Tue, Aug 31, 2010 at 1:12 AM, GD <gongda....@gmail.com> wrote:
> > I want to use the session object in the rails, but the browser has
> > disabled the cookie support. I store some string into the session obj,
> > but I can't retrieve the string value in another page.
>
> Possibly helpful:
>
> http://oldwiki.rubyonrails.org/rails/pages/HowToMaintainSessionWhenCo...
>
> --
> Hassan Schroeder ------------------------ hassan.schroe...@gmail.com
> twitter: @hassan

Marnen Laibow-Koser

unread,
Sep 1, 2010, 9:56:03 AM9/1/10
to rubyonra...@googlegroups.com
GD wrote:
> Hi:
>
> Thanks your reply very much. But The "Hidden Field Session" project is
> not available.
>
> I think that is it possible to append the session_id on the URL, and
> my rails
> program can get the session object by the session_id sent from
> previous page?
>
> It is like the JSP to rewrite the URL and append the jsessionid.

I would think so too. It amazes me that Rails can't do this. PHP and
JSP have both done it for ages.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org
--
Posted via http://www.ruby-forum.com/.

Reply all
Reply to author
Forward
0 new messages