While AMF is just an HTTP post processed by a J2EE servlet - the problem will be that the underlying Flash NetConnection would not handle being redirected to a login page (say, and HTML page or what have you)... also, you should not write anything to the response output stream as this will corrupt the AMF response.
You can, however, use basic or custom authentication and require a named service to have a J2EE-container authenticated user before the gateway will invoke the service. Custom authentication is preferable as it allows you to handle the AMF authentication response challenge using a Flex-based UI. This does rely on an exception being thrown, but it's a standard exception with the client code set to "Client.Authentication". -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Kent Henneuse Sent: Thursday, June 09, 2005 11:29 AM To: [email protected] Subject: [flexcoders] Servlet Filters and AMF In a Struts/JSP application you can put severlet filters in as a way to cross cut your system and provide validation of login/session on a user. If it fails, you redirect the user to a login page. Can I still utilize a servlet filter to check the login before my business delegates get executed by AMF? If so what will be sent back to the Flex Client that I can grab so that the user will get redirected to a login (and eventually resend their data if valid)? Maybe there is an easier way to handle a session based login scenario that I am not thinking of. I hate to through an exception and have a fault handler in every one of my commands on the Flex side (or a base command). Thanks, -Kent "Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." - Antoine de Saint Exupery 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/

