package com.action.main;
import java.util.Map;
import com.db.user.*;
import com.opensymphony.xwork2.ActionContext;
public class IndexAction {
private UserVO vo;
public String execute(){
String result = "";
int sabun = 0;
ActionContext context = ActionContext.getContext();
Map<String, UserVO> userMap = context.getSession();
vo = userMap.get("user");
try {
sabun = vo.getSabun();
} catch (NullPointerException e) {
sabun = 0;
}
if(sabun != 0){
result = "success";
//System.out.println("index:success");
}else{
result = "needlogin";
//System.out.println("index:needlogin");
}
return result;
}
}