grails - Grails jQuery Mobile 应用程序中的 Spring Security 刷新错误

标签 grails jquery-mobile spring-security

我有一个 Grails 2.0.1 jQuery Mobile 应用程序,这是我第一次使用 Spring Security。我遵循了 Peter Ledbrook post 中的出色说明。 .

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

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

http://localhost:8080/myapp/j_spring_security_check

为什么这会附加到我的网址上?如果我手动编辑 URL 并指向应用程序的根目录,则重新加载浏览器不会出现问题。

最佳答案

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

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

关于grails - Grails jQuery Mobile 应用程序中的 Spring Security 刷新错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9403584/

相关文章:

html - 如何在 jQuery Mobile 中动态更改输入字段的边框颜色

Spring security 自定义登录重定向冲突

sql - 当我将 List 变量更改为 ArrayList 时出现 DataIntegrityViolationException

session 超时后的 Grails Spring Security 重定向

mysql - 在 GRAILS 中搜索 BLOB 内容

PHP在mysql中插入由json对象发布的数据

css - Jquery Mobile Android - 固定全屏背景图片?

java - spring security 未调用 loadUserByUsername() 方法

java - Spring MVC 以编程方式登录 : No qualifying bean of type MyUserDetailsService

templates - Grails:如何将参数从自定义标记库传递到模板?