File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ configurations {
12
12
}
13
13
14
14
dependencies {
15
+ compile project(' :spring-security-taglibs' ),
16
+ jstlDependencies
15
17
16
18
runtime project(' :spring-security-web' ),
17
19
project(' :spring-security-config' ),
Original file line number Diff line number Diff line change
1
+ <%@taglib prefix =" c" uri =" http://java.sun.com/jsp/jstl/core" %>
2
+ <%@ taglib prefix =" security" uri =" http://www.springframework.org/security/tags" %>
1
3
2
4
<html >
3
5
<body >
4
6
<h1 >VERY Secure Page</h1 >
5
7
This is a protected page. You can only see me if you are a supervisor.
6
8
7
9
<p ><a href =" ../../" >Home</a >
8
- <p ><a href =" ../../j_spring_security_logout" >Logout</a >
10
+ <form action =" <c:url value=" /j_spring_security_logout " />" method =" post" >
11
+ <input type =" submit" value =" Logoff" />
12
+ <security:csrfInput />
13
+ </form >
9
14
</body >
10
15
</html >
Original file line number Diff line number Diff line change
1
+ <%@taglib prefix =" c" uri =" http://java.sun.com/jsp/jstl/core" %>
2
+ <%@ taglib prefix =" security" uri =" http://www.springframework.org/security/tags" %>
1
3
<html >
4
+ <head ><title >Secure Page</title ></head >
2
5
<body >
3
6
<h1 >Secure Page</h1 >
4
7
This is a protected page. You can get to me if you've been remembered,
@@ -10,6 +13,9 @@ or if you've authenticated this session.<br><br>
10
13
11
14
12
15
<p ><a href =" ../" >Home</a >
13
- <p ><a href =" ../j_spring_security_logout" >Logout</a >
16
+ <form action =" <c:url value=" /j_spring_security_logout " />" method =" post" >
17
+ <input type =" submit" value =" Logoff" /> (also clears any remember-me cookie)
18
+ <security:csrfInput />
19
+ </form >
14
20
</body >
15
21
</html >
You can’t perform that action at this time.
0 commit comments