The class is invoked normally by Remote Object Framework. Since the flashgateway.Gateway.getHttpRequest() method returns null I cannot call the getSession() method on it. I'am also not dealing with any threads at present. Do I need to do some configuration settings to have this working. I have the required flashgateway.jar file in WEB-INF/lib directory.
Pradeep On 5/6/05, Peter Farland <[EMAIL PROTECTED]> wrote: > You simply get the HttpServletRequest object from > flashgateway.Gateway.getHttpRequest() and then call > getSession from > there. If a session doesn't exist you need to pass true to getSession so > that it will create one for you. > > This method only works if you are within the same thread that made the > HTTP request - i.e. your class was invoked normally by our RemoteObject > framework by a normal NetConnection to the AMF Gateway Servlet. > > I've not heard of anyone having problems with the syntax so I'd be > interested to hear how Pradeep or yourself are having issues with this. > Without more information, however, I can not suggest what might be > wrong. > > > > > -----Original Message----- > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of Brett Palmer > Sent: Friday, May 06, 2005 1:53 AM > To: flexcoders@yahoogroups.com > Subject: Re: [flexcoders] HttpRequest and HttpSession access in Remote > Obj ect > > I think Pradeep's question is the same as mine. Is there a method in > Flex to gain access to the webcontainers session information? We need > this because we have a lot of existing server side code that uses a > session object to determine login status, user rights, etc. We also > use sessions to help determine the load on our servers. > > What is the recommended method for sharing session information with a > Flex/Flash client and the server when using remote objects? > > Thanks in advance, > > Brett > > On 5/5/05, Matt Chotin <[EMAIL PROTECTED]> wrote: > > > > > > > > Hmm, that seems odd considering we need a request to reach the > RemoteObject. > > You're not spawning a thread are you? > > > > > > > > ________________________________ > > > > > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] > On > > Behalf Of Pradeep > > Sent: Thursday, May 05, 2005 4:48 AM > > To: flexcoders@yahoogroups.com > > Subject: [flexcoders] HttpRequest and HttpSession access in Remote > Object > > > > > > > > > > I'am using Remote Objects to call my Java class methods on server. For > > maintaining user information I need Http Session object. So I tried > > using flashgateway.Gateway.getHttpRequest() and > > flashgateway.Gateway.getHttpRequest().getSession() to > get > > HttpRequest > > and HttpSession objects respectively. But > > flashgateway.Gateway.getHttpRequest() method returns > null. > > > > Unless I get reference to request obect I will not be able to access > > Session object. > > > > Can anybody please suggest something? > > > > > > > > > > ________________________________ > > Yahoo! Groups Links > > > > > > To visit your group on the web, go to: > > http://groups.yahoo.com/group/flexcoders/ > > > > To unsubscribe from this group, send an email to: > > [EMAIL PROTECTED] > > > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. > > > > Yahoo! Groups Links > > > > > > > > > ________________________________ > Yahoo! Groups Links > > > To visit your group on the web, go to: > http://groups.yahoo.com/group/flexcoders/ > > To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/