开发者

Is setting up jboss valve the only way to go?

I have an application set up using jaas module for login. There are ajax function calls in the application so I am experencing the notorious ajax session timeout problem, which means a ugly login page is getting into a page's place holder if session is timeout. I am now fi开发者_JAVA百科xing it in an ugly way by checking if the return ajax result contains the login form, but apparently, this is not a good way.

I tried to add a filter to check if session has timed out and return something meaningful for ajax request. But it seems that jaas runs prior to servlet filters. I have checked and acknowledged valve is some kind of "interceptor" which runs before jaas. It seems to be the thing I needed.But it's container-base not application-based, which is not so application-frieldly IMO. So I am asking if this is the only way to fulfil what I am trying to do or are there any better alternatives.

I am using Jboss AS 4.2.3

Thanks.


It seems to me there's no real solution to this problem. JAAS didn't consider session timeout using ajax at all.

We can only dirtily check if the ajax response contains the login page elements to detect if session is timeout or not.

I will mark this as answer. And I am happy to mark a better answer if there's any to come.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜