Last active
December 11, 2015 18:48
-
-
Save pikanji/4644106 to your computer and use it in GitHub Desktop.
Sample codes for blog post: http://kurotofu.sytes.net/kanji/fool/?p=970
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-<p><a href="<c:url value='/spring_security_login' />">Login</a></p> | |
+<p><a href="<c:url value='/login' />">Login</a></p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RequestMapping(value = "/login", method = RequestMethod.GET) | |
public String login() { | |
return "login"; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> | |
<%@ page session="false" %> | |
<html> | |
<head> | |
<title>Login</title> | |
</head> | |
<body> | |
<h1>My Login Page</h1> | |
<form action="<c:url value='j_spring_security_check' />" method="POST"> | |
<label>User Name : </label> | |
<input type="text" name="j_username" value="" /><br /> | |
<label>Password: </label> | |
<input type="password" name="j_password" value="" /><br /> | |
<input type="submit" value="Login" /> | |
</form> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- <http auto-config="true" /> | |
+ <http auto-config="true"> | |
+ <form-login login-page="/login" /> | |
+ </http> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment