Re: [flexcoders] HttpRequest and HttpSession access in Remote Obj ect
Hi James, Thanks for your suggestion. That was exactly the case. My RemoteObject classes were in different folder. So it was not loaded by the webapp's classloader. Copying the jar file to WEB-INF/lib worked. Thanks for the help. Pradeep On 5/9/05, James Ward [EMAIL PROTECTED] wrote: Pradeep, I think I saw this same problem when I did not have my RemoteObject class in the webapp's classloader. Is the class you are invoking in either the WEB-INF/lib or WEB-INF/classes dir? -James On Mon, 2005-05-09 at 11:22 +0530, Pradeep Chaudhary wrote: 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 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
Re: [flexcoders] HttpRequest and HttpSession access in Remote Obj ect
Pradeep, I think I saw this same problem when I did not have my RemoteObject class in the webapp's classloader. Is the class you are invoking in either the WEB-INF/lib or WEB-INF/classes dir? -James On Mon, 2005-05-09 at 11:22 +0530, Pradeep Chaudhary wrote: 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 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/
Re: [flexcoders] HttpRequest and HttpSession access in Remote Obj ect
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/
RE: [flexcoders] HttpRequest and HttpSession access in Remote Obj ect
-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: http://docs.yahoo.com/info/terms/
RE: [flexcoders] HttpRequest and HttpSession access in Remote Obj ect
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: http://docs.yahoo.com/info/terms/
Re: [flexcoders] HttpRequest and HttpSession access in Remote Obj ect
Hey Brett Pradeep, Flex 1.5 uses the flashgateway.Gateway.getHttpRequest(), flashgateway.Gateway.getHttpResponse(), and flashgateway.Gateway.getServletConfig() methods. To use these methods, you must have the WEB-INF/lib/flashgateway.jar file in your classpath. Taken from http://www.macromedia.com/support/documentation/en/flex/1_5/migration.html I think there is more documentation on this somewhere, but I couldn't find it. Hope that helps. -James On Thu, 2005-05-05 at 23:52 -0600, Brett Palmer wrote: 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: http://docs.yahoo.com/info/terms/
RE: [flexcoders] HttpRequest and HttpSession access in Remote Obj ect
Hmm, that seems odd considering we need a request to reach the RemoteObject. Youre 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.