Subversion Repositories SmartDukaan

Rev

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

Rev 7235 Rev 13173
Line 26... Line 26...
26
    private String message = "";
26
    private String message = "";
27
    private String hash;
27
    private String hash;
28
 
28
 
29
    private long circleId;
29
    private long circleId;
30
    
30
    
31
    @Action("/")
31
    @Action("/login")
-
 
32
    
32
    public String index()
33
    public String storeSession()
33
    {
34
    {   
34
        String loginStatus = (String) request.getSession().getAttribute("LOGGED_IN");
35
        String loginStatus = (String) request.getSession().getAttribute("LOGGED_IN");
35
        if(loginStatus != null && loginStatus.equals("TRUE")){
36
        if(loginStatus != null && loginStatus.equals("TRUE")){
36
            redirectUrl = "/home";
37
            redirectUrl = "/home";
37
            return "redirect";
38
            return "redirect";
38
        }
39
        }
Line 71... Line 72...
71
            storeId = Long.parseLong(storeIdString);
72
            storeId = Long.parseLong(storeIdString);
72
        }
73
        }
73
 
74
 
74
        return INDEX;
75
        return INDEX;
75
    }
76
    }
-
 
77
    
-
 
78
    @Action("/")
76
 
79
    
77
    public String doLogin()
80
    public String doLogin()
78
    {
81
    {
79
        log.info("Logging in!");
82
        log.info("Logging in!");
80
        password = request.getParameter("password");
83
        password = request.getParameter("password");
81
        storeIdString = (String) request.getSession().getAttribute("STORE_ID");
84
        storeIdString = (String) request.getSession().getAttribute("STORE_ID");
Line 104... Line 107...
104
        }
107
        }
105
        redirectUrl = "/home";
108
        redirectUrl = "/home";
106
        return "redirect";
109
        return "redirect";
107
    }
110
    }
108
    
111
    
-
 
112
    @Action("/")
-
 
113
    
109
    public String doLogout()
114
    public String doLogout()
110
    {
115
    {
111
        log.info("Logging out!");
116
        log.info("Logging out!");
112
        request.getSession().setAttribute("LOGGED_IN", null);
117
        request.getSession().setAttribute("LOGGED_IN", null);
113
        try {
118
        try {