Announcement Announcement Module
Collapse
No announcement yet.
Spring-Security Custom Login Page Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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.

    Comment

    Working...
    X