
Originally Posted by
Chaps
I have a little problem here. I'm using acegi for the security part of my project, and XT-Ajax to call some actions.
A problem occurs when the session timeout. When a called the action, acegi is suppose to redirect to the login page, but because I'm calling the action using ajax, nothing happens.
[CUT]
Is it possible to redirect to another page when using ajax?
Hi Guillaume,
the problem is that you cannot do a normal redirect when using Ajax, so you cannot use standard Acegi redirect capabilities when doing Ajax calls.
The RedirectAction (https://springmodules.dev.java.net/s...ectAction.html) is the standard way to do redirects in XT Ajax.
In order to integrate the RedirectAction with Acegi, you can code an HttpServlet that outputs the content of the action, and make Acegi point to this servlet.
Is it clear enough?
I know it is a kind of hack: I plan to solve it better in the near future ( XT Ajax is just 0.8
).
Let us know how is it.
Cheers,
Sergio B.
Sergio Bossa
Spring Modules Team