Results 1 to 2 of 2

Thread: Spring-Security Custom Login Page

  1. #1
    Join Date
    Dec 2009
    Posts
    16

    Default 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

  2. #2
    Join Date
    Sep 2004
    Location
    Manchester, NH
    Posts
    1,236

    Default

    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
  •