0

I'm using spring security on my grails app and want to to this:

My Homepage is : http://www.test.com:8080/my-app/ this is the index.gsp

Now I have insert a login form in the index.gsp file:

<form action='${postUrl}' method='POST' id='loginForm' class='cssform' autocomplete='off'>
<p>
<label for='username'><g:message code="springSecurity.login.username.label"/>:</label>
<input type='text' class='text_' name='j_username' id='username'/>
</p>

<p>
<label for='password'><g:message code="springSecurity.login.password.label"/>:</label>
<input type='password' class='text_' name='j_password' id='password'/>
</p>
<p id="remember_me_holder">
<input type='checkbox' class='chk' name='${rememberMeParameter}' id='remember_me' <g:if test='${hasCookie}'>checked='checked'</g:if>/>
<label for='remember_me'><g:message code="springSecurity.login.remember.me.label"/></label>
</p>

<p>
<input type='submit' id="submit" value='${message(code: "springSecurity.login.button")}'/>
</p>
</form>

Now when I insert the username and password I want to redirect to url : http://www.test.com:8080/my-app/customer/list

How can I do this?

Taryn
  • 242,637
  • 56
  • 362
  • 405
Ti Duu
  • 35
  • 2
  • 7

1 Answers1

4

This answer should help you: Grails Spring Security: redirect after login success/failure

This question will very likely be considered a duplicate. If you don't mind, before posting a question on SO, run a quick search (here or on Google). :)

Community
  • 1
  • 1
lucke84
  • 4,516
  • 3
  • 37
  • 58