簡體   English   中英

Spring Security讓登錄重定向失敗

[英]Spring Security grails login redirect

我在grails應用程序上使用spring security,並希望這樣做:

我的主頁是: http : //www.test.com :8080/my-app /這是index.gsp

現在,我在index.gsp文件中插入了一個登錄表單:

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

現在,當我輸入用戶名和密碼時,我想重定向到url: http : //www.test.com : 8080/ my-app/customer/ list

我怎樣才能做到這一點?

這個答案應該可以幫助您: Grails Spring Security:登錄成功/失敗后重定向

這個問題很可能會被視為重復。 如果您不介意,請在對SO發表問題之前,先進行快速搜索(在此處或在Google上)。 :)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM