Subversion Repositories SmartDukaan

Rev

Rev 13173 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 13173 Rev 13174
Line 30... Line 30...
30
    
30
    
31
    @Action("/login")
31
    @Action("/login")
32
    
32
    
33
    public String storeSession()
33
    public String storeSession()
34
    {   
34
    {   
-
 
35
        log.info("Store session!");
35
        String loginStatus = (String) request.getSession().getAttribute("LOGGED_IN");
36
        String loginStatus = (String) request.getSession().getAttribute("LOGGED_IN");
36
        if(loginStatus != null && loginStatus.equals("TRUE")){
37
        if(loginStatus != null && loginStatus.equals("TRUE")){
37
            redirectUrl = "/home";
38
            redirectUrl = "/home";
38
            return "redirect";
39
            return "redirect";
39
        }
40
        }
Line 42... Line 43...
42
        if(storeIdString == null || storeIdString.isEmpty()){
43
        if(storeIdString == null || storeIdString.isEmpty()){
43
            //If not found try to get the hotspotId from request
44
            //If not found try to get the hotspotId from request
44
            //It is a bit confusing but "storeIdString" from the next line on means hotspot id
45
            //It is a bit confusing but "storeIdString" from the next line on means hotspot id
45
            storeIdString = request.getParameter("storeid");
46
            storeIdString = request.getParameter("storeid");
46
            if(storeIdString == null){
47
            if(storeIdString == null){
-
 
48
                log.info("Empty store is string!");
47
                return "authfail";
49
                return "authfail";
48
            }else{
50
            }else{
49
                //If we get the hotspot id then we fetch the store and store the store id in session to use on subsequent requests
51
                //If we get the hotspot id then we fetch the store and store the store id in session to use on subsequent requests
50
                try {
52
                try {
51
                    TransactionClient tcl = new TransactionClient(); 
53
                    TransactionClient tcl = new TransactionClient();