托里
{
session.remove attribute (logonsessdata );
session.invalidate (;
stringpagetoforward=request.getcontextpath (;
response.sendredirect (pagetoforward;
}
catch (Exception sqle )
{
}
inlogoutservletiwroteabovecodeindopostanddogetmethod.afterlogoutitshowsloginscreeenandthenifipressbackbuttonitshowspreviouss ccorevious clickonanypageitshows ' http status 500 ' andnowifipressf5then it ' sheatingloginservletandgettingthefeet
howtostopthisproblemshowthatafterlogoutusingbackbuttonandf5usercannotuseanypage?
watyouaredoingisgood.browseriscachingthepreviouspages,andwhenyouclickbackbuttonitistakingtopreviouscachedpage。
youneedtoaddcacheheaderswhichdoesnotallowbrowsertocachepage。