-
Dec 22nd, 2009, 04:01 AM
#1
Spring-Security Custom Login Page
<security:http auto-config="true">
<security:intercept-url pattern="/**" access="ROLE_ADMIN" />
<security:concurrent-session-control max-sessions="1" exception-if-maximum-exceeded="true" />
<security:form-login default-target-url="/MyLoginPage" login-page="/MyLoginPage"
always-use-default-target="true"
authentication-failure-url="/MyLoginPage"/>
<security:logout invalidate-session="true"
logout-success-url="/app/login" />
</security:http>
When i am using a Custom Login Page it was throwing an error
The page isn't redirecting properly
If i remove the Custom Login Page it was redirected to default LoginPage provided by Spring.
Please help me to sort out this problem.
Thanks in Advance
Regards
Suresh
-
Dec 22nd, 2009, 05:47 AM
#2
default-target-url should not be set to the login page. This is the default target page after the user logs in.
Also, if this is the only URL pattern you have:
<security:intercept-url pattern="/**" access="ROLE_ADMIN" />
You have secured the login page as well as the rest of the application. This is covered in the FAQ.
Peter Mularien | Blog
Author, Spring Security 3 (Book) - Packt Publishing, Available in print and eBook form
SCJP 5, Oracle DBA
Any postings are my own opinion, and should not be attributed to my employer or clients.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules