i solve that by make the logout page send the user to the home page for the siteand in the home page i use the invalidate function in jsp code try this and let me know if there is some thing better please.