if you are handling session in flex and java then you need to make a remote object call to your java class and check whether session contain some value or not.
public String getUser(){
String status="";
if(session!=null){
System.out.println(session.getId());
status= (String)session.getAttribute("uname");
}else{
session = FlexContext.getFlexSession();
status=null;
}
return status;
}
in Flex check the result of this method is null or not if its not null then fine else navigate to your login page this way you can approch to session handling in flex.