Grails jQuery Mobile应用程序中的Spring Security Refresh错误 [英] Spring Security Refresh Error in Grails jQuery Mobile app

查看:97
本文介绍了Grails jQuery Mobile应用程序中的Spring Security Refresh错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Grails 2.0.1 jQuery Mobile应用程序,这是我第一次使用Spring Security。我遵循Peter Ledbrook的发布



成功登录后,应用程序和安全控件的使用正常。但是,如果用户执行浏览器刷新,则会发生AuthenticationServiceException。



登录后显示在浏览器中的URL是我的应用程序的根目录加上/ j_spring_security_check

  http:// localhost:8080 / myapp / j_spring_security_check 

这是为什么附加到我的网址?如果我手动编辑URL并指向应用程序的根目录,那么浏览器重新加载没有任何问题。

尝试设置 data-ajax ='false'形成元素

 < form id =loginFormname ='f'action =< c:url value ='/ j_spring_security_check'/> 
method ='POST'data-ajax =false>


I have a Grails 2.0.1 jQuery Mobile app and it's my first use of Spring Security. I followed the excellent instructions in Peter Ledbrook's post.

After successful login, use of the app and security controls are working fine. However, if a user does a browser refresh an AuthenticationServiceException occurs.

The URL shown in the browser after login is the root of my app plus /j_spring_security_check

http://localhost:8080/myapp/j_spring_security_check

Why is this appended to my URL? If I manually edit the URL and point to the app's root, there is no problem doing a browser reload.

解决方案

Try setting data-ajax='false' to form element

<form id="loginForm" name='f' action="<c:url value='/j_spring_security_check' />"
                method='POST'  data-ajax="false">

这篇关于Grails jQuery Mobile应用程序中的Spring Security Refresh错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆