Subversion Repositories SmartDukaan

Rev

Rev 924 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 924 Rev 925
Line 11... Line 11...
11
import java.io.IOException;
11
import java.io.IOException;
12
import java.util.Date;
12
import java.util.Date;
13
 
13
 
14
import org.apache.log4j.Logger;
14
import org.apache.log4j.Logger;
15
import org.apache.struts2.convention.annotation.Result;
15
import org.apache.struts2.convention.annotation.Result;
-
 
16
import org.apache.struts2.convention.annotation.Results;
16
 
17
 
17
/**
18
/**
18
 * 
19
 * 
19
 * @author rajveer
20
 * @author rajveer
20
 * 
21
 * 
21
 */
22
 */
-
 
23
@Results({
-
 
24
	@Result(name="success", type="redirectAction", params = {"actionName" , "home"}),
-
 
25
	@Result(name = "redirect", location = "${redirectUrl}", type = "redirect")
-
 
26
})
22
 
27
 
23
@Result(name = "redirect", location = "${redirectUrl}", type = "redirect")
-
 
24
public class LoginController extends BaseController {
28
public class LoginController extends BaseController {
25
 
29
 
26
	/**
30
	/**
27
	 * 
31
	 * 
28
	 */
32
	 */
Line 36... Line 40...
36
	public LoginController() {
40
	public LoginController() {
37
		super();
41
		super();
38
	}
42
	}
39
 
43
 
40
	public String index() throws SecurityException, IOException {
44
	public String index() throws SecurityException, IOException {
-
 
45
		if(userinfo.isLoggedIn()){
-
 
46
    		return "success";
-
 
47
    	}
41
		htmlSnippets.put("LOGIN_HEADER", pageLoader.getLoginHeaderHtml());
48
		htmlSnippets.put("LOGIN_HEADER", pageLoader.getLoginHeaderHtml());
42
		return "index";
49
		return "index";
43
	}
50
	}
44
 
51
 
45
	public String create() throws SecurityException, Exception {
52
	public String create() throws SecurityException, Exception {