acegi 沒有正常導入登入前的那一頁面

4 views
Skip to first unread message

derekypp peng

unread,
Jan 19, 2010, 12:15:39 PM1/19/10
to grail...@googlegroups.com
我有是acegi的問題 不好意思,又要麻煩大家了

假設我有一個連結 http://myProject/book/show/3

book和show 都有被acegi保護著,所以連上面的網址 會自動被導到 http://myProject/login/auth
然後輸入正確的帳號密碼,又會導回 http://myProject/book/show/3

這樣的情況是正常的

可是我現在又多了 http://myProject/flash/b.html
其實是在webapps資料夾,建了/flash/b.html 

但我也想用acegi 保護這個/flash.d.html 
確實有受到權限,可是當被導到login 畫面後,再輸入帳密,導回去的不是http://myProject/flash/b.html
而是
http://myProject/ (首頁)

檢查acegi 的loginController 的66行
postUrl = "${request.contextPath}${config.filterProcessesUrl}"
不論是一般的contoller 還是我剛剛那種自已建一個html
他的值好像都一樣,所以不知道為什麼 針對自已建的html 就不會正確導回那頁

只好又請問大家了

謝謝~



B09.gif
33A.gif

Tigerf

unread,
Jan 20, 2010, 2:55:21 AM1/20/10
to grail...@googlegroups.com
前段时间看代码,它的做法是在session中保存了request对象。登录成功后再取出来,做forward。也许其中利用了grails的某些特性,对非controller的请求不好使。建议再看看插件的代码,也许能找到办法。

2010/1/20, derekypp peng <dere...@gmail.com>:
> --
> 您收到此邮件是因为您订阅了 Google 网上论坛的“Grails联盟-GrailsUnion”论坛。
> 要向此网上论坛发帖,请发送电子邮件至 grail...@googlegroups.com
> 要取消订阅此网上论坛,请发送电子邮件至 grailsunion...@googlegroups.com
> 若有更多问题,请通过 http://groups.google.com/group/grailsunion?hl=zh-CN 访问此网上论坛。
>


--
Thanks & Best Regards
Tigerf
B09.gif
33A.gif

derekypp peng

unread,
Jan 21, 2010, 3:56:15 AM1/21/10
to grail...@googlegroups.com
hi all ,
我發現一個暫時解決的小方法
就是直接把/web-app/flash/d.html   ---> 直接改副檔名  d.gsp
整個認證的導向就正確了



2010/1/20 Tigerf <tig...@gmail.com>
B09.gif
1E3.gif
33A.gif
Reply all
Reply to author
Forward
0 new messages