Session problem?

Hi guys,Now i am doing one project...In that, first login in to the application.then its displaying the home page.Then i am accessing the some links...It's working fine.. Suppose, if i click logout, then it's displaying home page, then if i click back button of IE its displaying the previous page along with the values eventhough if u r invalidating the session.even in every jsp i am checking for session variables.How to display a message session expired,please login again

[485 byte] By [gvmania] at [2007-10-3 9:53:42]
# 1

IE just redisplays the page it previously recieved without requesting the server...

you might put the headers to no-cache* on all your pages

don't worry about your session, it is really expired. the browser just doesn't know it(but will learn soon;))

* those header should work with all browsers :

Pragma: no-cache

Expires: 0

Cache-Control: no-cache, must-revalidate

alban.maillerea at 2007-7-15 5:11:21 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Thank u for ur reply Mr alban...can u tell me a exact code for that pragma?
gvmania at 2007-7-15 5:11:21 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
Hi ,This is what alban was saying....response.setHeader("pragma","no-cache");response.setHeader("Cache-Control","no-cache, must-revalidate ");response.setDateHeader("Expires",0);But after doing that do some testing..... try to refresh the page
java_usera at 2007-7-15 5:11:21 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4

Dont mistake me Mr Alban...

can u tell me after which statement i have to implement ur given logic

See my code is like this:

<html>

if(session.getAttribute("SessionVarialble") != null){

<body>

Here i am writing some logics...

</body>

}else{

<head>

<META HTTP-EQUIV=Refresh CONTENT=5;URL=loginPage.html>

</head>

<body>

Session Expires

</body>

}

</html>

gvmania at 2007-7-15 5:11:21 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5
Java code must be surrounded by <% %>just put the line java_user gave you at the beginning of you jsp (with <%%>)
alban.maillerea at 2007-7-15 5:11:21 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...