Results 1 to 5 of 5

Thread: custom login controller in sparklr2 example

  1. #1
    Join Date
    Oct 2009
    Location
    Milano
    Posts
    49

    Default custom login controller in sparklr2 example

    hi,
    how do i set up a custom login controller instead of the one already defined in the xml?

    i thought it would just take to create a @Controller LoginController with "login.do" as @RequestMapping but that's not quite working out now.
    2+2=5

  2. #2
    Join Date
    Jun 2005
    Posts
    4,230

    Default

    Out of the box, sparklr uses Spring Security form login, so /login.do is not a @RequestMapping. You are free to change that to any authentication mechanism you like. Maybe this is a question for the main Spring Security forum?

  3. #3
    Join Date
    Oct 2009
    Location
    Milano
    Posts
    49

    Default

    you're probably right. i was reading this and figured it would have to work for my case too
    2+2=5

  4. #4
    Join Date
    Jun 2005
    Posts
    4,230

    Default

    That looks 100% relevant. But the @RequestMapping for the LoginController is /login (to render the form) not /login.do. Compare the config in sparklr2:

    Code:
    <form-login authentication-failure-url="/login.jsp?authentication_error=true" default-target-url="/index.jsp"
    			login-page="/login.jsp" login-processing-url="/login.do" />
    (There's no controller because the login-page is /login.jsp.)

  5. #5
    Join Date
    Oct 2009
    Location
    Milano
    Posts
    49

    Default

    as it happens, i figured that bit out 2 minutes after posting here.

    still some issue.

    posted on Spring Security section (http://bit.ly/MK778A)

    thanks
    2+2=5

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •