开发者

Icefaces2.0 - Problem when login again after a logout

I am developing with IceFaces 2.0 + Spring 2.5 + jpa1.0/Hibernate 3.2.5 I have a problem that I cannot solve, I hope in your cleverness!

I am developing a web application that, obviously, has login/logout functionality. The problem is that, if I login after I did a logout, I have a behaviour completely absurd and sometimes unpredictable: popups does not close no more, a lot of buttons does not work, etc... But, on the first login, everything is all right!

I also tried o remove manually all of my开发者_开发问答 beans session scoped, nothing. I tried to logout from IE8, and then login from Firefox, the problem persists. Any ideas?

This is the code of the Logout servlet:

 HttpSession session = (HttpSession) request.getSession(false);
 if(session != null) {
    session.invalidate();
    try {
        response.sendRedirect("/" + request.getContextPath() + "/" + PRIMA_PAGINA);
         } catch (IOException e) {
    }
 }

Should I use, instead

FacesContext.getCurrentInstance().getExternalContext().invalidateSession();

from a bean method? I did try, but the problem is always the same.

Thank you in advance!!


Try this and let me know if you still have the issue:

    HttpServletRequest request = 
        (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest(); 
    request.getSession().invalidate(); 
    request.getSession(true);
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜