Package com.action.main

Source Code of com.action.main.IndexAction

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;       
  }
}
TOP

Related Classes of com.action.main.IndexAction

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.