Hi Sid, 
 Thanks for the reply. I later realized that since the servlet was
being called from the flex application the url redirect or the forward
would not work. I have moved the authorization check such that it
occurs before the flex app is loaded. 

Regards,
Gaurav
  
 


--- In flexcoders@yahoogroups.com, Sid Maskit <[EMAIL PROTECTED]> wrote:
>
> Once you've loaded the flex movie, it would seem to me to make more
sense to treat it as in control, and treat the servlet as a service
for the flex movie. I would set up a handler for when the servlet
returns, and have the servlet return some value which tells the flex
movie what to do. It could return a URL which the flex movie could
then navigate to, or it could return an empty string in which case the
flex movie would do nothing. If you wanted to make it a little more
secure, you could hard code a default URL into the flex movie, and
have it navigate there unless it received a message telling it to do
something else. That way it would default to unloading itself, and
would only stick around if the servlet told it that was OK.
> 
> Hope that helps.
> 
> 
> 
> 
> ----- Original Message ----
> From: gaurav1146 <[EMAIL PROTECTED]>
> To: flexcoders@yahoogroups.com
> Sent: Tuesday, July 15, 2008 10:17:10 PM
> Subject: [flexcoders] Navigating from flex to jsp page
> 
> 
> I have a flex application that loads as soon as a user hits a url. Now
> this application has a creationComplete method which makes a call to a
> java servlet. In the servlet (/servlet filter) I perform certain
> authorization checks and if the check fails I want to navigate the
> user to a jsp page.
> 
> I tried using  the forward method of java's RequestDisptacher class
> but once the flex application has loaded this does not seem to work
> and the user is not taken to the jsp page. Also I cannot use Flex's
> navigateToURL because  jsp redirection is conditional based on
> authorization checks in my servlet. Please let me know on how to go
> about it.
> 
> TIA 
> Gaurav
>


Reply via email to