2014-10-11 28 views
0

使用Grails 2.4.3和Spring安全插件:spring-security-core:2.0-RC4Grails的/ jQuery Mobile的觀點登錄

默認登錄視圖auth.gsp工作正常後不顯示。
增加了一個用戶,可以登錄,註銷 並查看受保護的頁面。

然後我添加JQuery移動文件到我的佈局和視圖。

我複製到auth.gsp /views/login/auth.gsppastebin
/views/layouts/main.gsp佈局看起來像這樣pastebin

我的登錄頁面,如下所示:

enter image description here

當我和無效的憑證登錄我得到一個空白頁。

enter image description here

之前的頁面的源和提交後是完全一樣的。 pastebin

如果我刪除<script src="http://code.jquery.com/mobile/1.4.4/jquery.mobile-1.4.4.min.js"></script>main.gsp然後我確實看到提交後的輸出。

enter image description here

希望有人知道我在做什麼錯。

UPDATE
plugin/springsecurity/LoginController.groovy

 def authfail() { 

      // .... 

      if (springSecurityService.isAjax(request)) { 
        render([error: msg] as JSON) 
      } 
      else { 
        flash.message = msg 
        redirect action: 'auth', params: params 
      } 
    } 

如果我更改爲:

 def authfail() { 
      // ... 

      flash.message = msg 
      redirect action: 'auth', params: params    
    } 

那麼它是工作,我再次看到登錄視圖。

仍然不起作用的是成功登錄後的重定向。斯蒂爾看到一個空白頁面。

回答