JAAS在Ajax模式下

I have a question. Is it possible to use JAAS authorization in AJAX mode. I mean, can I use form authorization with j_security_check, without redirecting after login, but just stay at the same page..

I want to make user authorization on e-commerce web site, so I cant't make separate page for login.. All I need is login button on the main page, user press this button and some kind of popup window appears with login and password fields, user types in his credentials, press login and gets authorized via ajax request..and no redirect..

It will be little bit tricky to do that: One way to do is

  1. When user clicks on the button (the one you already mentioned), it opens a new pop up (a resized page with minimal options) which will load the login page from JAAS.
  2. Once you submit the valid credentials, the next page opens in the same pop-up window
  3. Once the page has loaded, use javascript onLoad event to close this popup.

Founds this link on Javaworld of one more way to achieve it.