Forum: Ruby on Rails Session data from Java Applet

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
amtron (Guest)
on 2007-02-13 02:08
(Received via mailing list)
Hello,

I'm trying to upload files from a Java applet, but this applet does
not have the same session as the browser.  My solution is to pass the
session id through the URL and have RAILS find the data needed to
process the photos.
I found this code which works in getting me there partially,
      @user =
CGI::Session::ActiveRecordStore::Session.find_by_session_id(params[:session]).data[:user]

 but I keep running into this error:

ArgumentError (undefined class/module User):
    .//app/controllers/account_controller.rb:162:in `load'
    .//app/controllers/account_controller.rb:162:in `upload_photos'
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/
action_controller/base.rb:1095:in `send'
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/
action_controller/base.rb:1095:in `perform_action_without_filters'


The @user variable get's loaded with the base64 data but it doesn't
recognize the User class when unmarshaling.  Anyone know why this
would happen?

Thanks,
Jason
This topic is locked and can not be replied to.