문제

I have a sample application using Flex and Java using of Blazeds.

How can I provide session to a particular user? For example one user can log in to the application, then if same user copy the url into new tab of the same browser then it asks for login again.

도움이 되었습니까?

해결책

Providing session in java side is Better..

다른 팁

would you not be able to use a cookie to handle session management, its possible that the cookie is not being correctly set with the session ID.

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top