Grails jQuery Mobile应用程序中的Spring Security Refresh错误 [英] Spring Security Refresh Error in Grails jQuery Mobile app
问题描述
我有一个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屋!