| Author |
Spring Security - Custom logout page
|
ahmed yehia
Ranch Hand
Joined: Apr 22, 2006
Posts: 424
|
|
Spring Security logout links to 'j_spring_security_logout' by default, I want to link to logout.jsp instead.
E.g. in logout.jsp :
<jsp:forward page="j_spring_security_logout" /><% response.sendRedirect("j_spring_security_logout"); %><% session.invalidate(); %>
These all seem to work identical as firing a logout action.
However which could a be better approach.
|
 |
Freddy Wong
Ranch Hand
Joined: Sep 11, 2006
Posts: 959
|
|
You still need to send the request to j_spring_security_logout, but then you can add logout-success-url to redirect it to your logout.jsp
|
SCJP 5.0, SCWCD 1.4, SCBCD 1.3, SCDJWS 1.4
My Blog
|
 |
ahmed yehia
Ranch Hand
Joined: Apr 22, 2006
Posts: 424
|
|
I have this in applicationContext-security xml file :
It works fine whether the request came through forward or redirect.
Just want to make sure these 2 approaches don't vary.
|
 |
 |
|
|
subject: Spring Security - Custom logout page
|
|
|