logout problem

I want to know, when we log out , we see again the login page.And now when we click back button in the button bar of the page, we don't see the previous page rather we're redirected to the same login page.How it is done?please help me I have to implement it in my project.I have managed the session ie..,after logging out one can't do anything becoz session is killed.But I could not manage the redirection to the same login page when one clicks the back button in the button bar of the page.

[502 byte] By [Vinodbhai@suna] at [2007-11-27 6:09:04]
# 1
So what happens in your project when the click the back button?All of your pages should check if the user has a valid session, and redirect to the login page if he/she hasn't.Kaj
kajbja at 2007-7-12 17:12:23 > top of Java-index,Java Essentials,Java Programming...
# 2

Ofcourse i'm checking the session in every page.What I meant is how to redirect to the login page when one clicks the back standard button bar of the page.you see any site,like yahoo,when u log out and then clicks the back button u r directed to the same page.I think javascript has sth to do with it.Please,help.

Vinodbhai@suna at 2007-7-12 17:12:23 > top of Java-index,Java Essentials,Java Programming...
# 3
I guess they clear the page history, and yes, it'd be JavaScript then.
quittea at 2007-7-12 17:12:23 > top of Java-index,Java Essentials,Java Programming...
# 4
> I guess they clear the page history, and yes, it'd be> JavaScript then.I'm not sure about that (but I'm not an HTML guy :). Aren't they just using the directives for no cache and sets the page to expire immediately?Kaj
kajbja at 2007-7-12 17:12:23 > top of Java-index,Java Essentials,Java Programming...
# 5
what I'd do is do that and have a process on the server that forwards to the login page if there's no valid session.
jwentinga at 2007-7-12 17:12:23 > top of Java-index,Java Essentials,Java Programming...
# 6

Hi to all ,

I have an another problem but again it is related to Tomcat and session variables.

We wrote two servlet codes one is logging in the user and then the other one gets initiated .

Then the servlet finally working has to refresh itself automatically .

We created session variables in the logging servlet so that we can retrieve them in the refreshing one but it does not work it gives

http error 500

I think it returns null for session variables

I read somewhere that it might be about work folder write permission we opened that folder to everyone but still it does not work ?

What else could be ? can it be related to installment of Tomcat ? Could you please help me ?

Thanks in advance

malkaraa at 2007-7-12 17:12:23 > top of Java-index,Java Essentials,Java Programming...
# 7

malkara i suggest you open a new thread for your problem encountered.

Vinodbhai: I found this somewhere in the codes I have written long time ago, I come across this problem before. Try it.

public void printHeader( JspWriter out, HttpServletResponse response )

throws IOException

{

out.println( "<META HTTP-EQUIV=\"CACHE-CONTROL\" CONTENT=\"NO-CACHE, MUST-REVALIDATE\">" );

out.println( "<META HTTP-EQUIV=\"PRAGMA\" CONTENT=\"NO-CACHE\">" );

out.println( "<META HTTP-EQUIV=\"EXPIRES\" CONTENT=\"-1\">" );

response.addHeader( "CACHE-CONTROL", "NO-CACHE, MUST-REVALIDATE" );

response.addHeader( "PRAGMA", "NO-CACHE" );

response.addHeader( "EXPIRES", "-1" );

}

ChongWeia at 2007-7-12 17:12:23 > top of Java-index,Java Essentials,Java Programming...
# 8
thanks for your help but the problem was soemthing related to variable writing in html
malkaraa at 2007-7-12 17:12:23 > top of Java-index,Java Essentials,Java Programming...